include: nuttx: fix nxstyle errors

Fix nxstyle errors to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2021-02-03 09:42:38 +01:00 committed by Xiang Xiao
parent 0c1e784245
commit 861c0071bd
33 changed files with 654 additions and 515 deletions

View File

@ -51,8 +51,7 @@
* Pre-processor Definitions
****************************************************************************/
/*
* CRC64_CHECK is the CRC64 of the string "123456789" without the null byte.
/* CRC64_CHECK is the CRC64 of the string "123456789" without the null byte.
*
* const uint8_t checkbuf[] =
* {

View File

@ -222,7 +222,7 @@ int dlsymtab(FAR const struct symtab_s *symtab, int nsymbols);
*
* Reference: OpenGroup.org
*
* ****************************************************************************/
* **************************************************************************/
FAR void *dlopen(FAR const char *file, int mode);
@ -297,7 +297,7 @@ FAR void *dlsym(FAR void *handle, FAR const char *name);
* diagnostic information will be available through dlerror().
*
* Reference: OpenGroup.org
* ****************************************************************************/
* *************************************************************************/
int dlclose(FAR void *handle);

View File

@ -76,9 +76,13 @@ extern "C"
FAR struct group *getgrnam(FAR const char *name);
FAR struct group *getgrgid(gid_t gid);
int getgrnam_r(FAR const char *name, FAR struct group *grp, FAR char *buf,
size_t buflen, FAR struct group **result);
int getgrgid_r(gid_t gid, FAR struct group *grp, FAR char *buf, size_t buflen,
int getgrnam_r(FAR const char *name,
FAR struct group *grp,
FAR char *buf,
size_t buflen,
FAR struct group **result);
int getgrgid_r(gid_t gid, FAR struct group *grp,
FAR char *buf, size_t buflen,
FAR struct group **result);
int initgroups(FAR const char *user, gid_t group);

View File

@ -118,8 +118,8 @@ extern "C"
* the binary to the seek-able serial OUT stream.
*
* These streams may be files or, in another usage example, the IN stream
* could be a serial port and the OUT stream could be a memory stream. This
* would decode and write the serial input to memory.
* could be a serial port and the OUT stream could be a memory stream.
* This would decode and write the serial input to memory.
*
* Input Parameters:
* instream - The incoming stream from which Intel HEX data will be

View File

@ -5,26 +5,27 @@
* Copyright (c) 2000-2008 Marc Alexander Lehmann <schmorp@schmorp.de>
* This algorithm is believed to be patent-free.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER-
* CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE-
* CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
* ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/

View File

@ -61,7 +61,7 @@ struct ether_header
{
uint8_t ether_dhost[ETHER_ADDR_LEN]; /* Destination Ethernet address */
uint8_t ether_shost[ETHER_ADDR_LEN]; /* Source Ethernet address */
uint16_t ether_type; /* Ethernet packet type*/
uint16_t ether_type; /* Ethernet packet type */
};
/****************************************************************************

View File

@ -1,4 +1,4 @@
/*******************************************************************************************
/****************************************************************************
* include/net/if.h
*
* Copyright (C) 2007, 2008, 2012, 2015 Gregory Nutt. All rights reserved.
@ -31,21 +31,21 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*******************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NET_IF_H
#define __INCLUDE_NET_IF_H
/*******************************************************************************************
/****************************************************************************
* Included Files
*******************************************************************************************/
****************************************************************************/
#include <signal.h>
#include <sys/socket.h>
/*******************************************************************************************
/****************************************************************************
* Pre-processor Definitions
*******************************************************************************************/
****************************************************************************/
/* Sizing parameters */
@ -78,8 +78,8 @@
#define IFF_IS_RUNNING(f) (((f) & IFF_RUNNING) != 0)
#define IFF_IS_NOARP(f) (((f) & IFF_NOARP) != 0)
/* We only need to manage the IPv6 bit if both IPv6 and IPv4 are supported. Otherwise,
* we can save a few bytes by ignoring it.
/* We only need to manage the IPv6 bit if both IPv6 and IPv4 are supported.
* Otherwise, we can save a few bytes by ignoring it.
*/
#if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6)
@ -110,12 +110,12 @@
# define IFF_IS_IPv4(f) (1)
#endif
/*******************************************************************************************
/****************************************************************************
* Public Type Definitions
*******************************************************************************************/
****************************************************************************/
/* Structure passed with the SIOCMIINOTIFY ioctl command to enable notification of
* of PHY state changes.
/* Structure passed with the SIOCMIINOTIFY ioctl command to enable
* notification of of PHY state changes.
*/
struct mii_ioctl_notify_s
@ -124,8 +124,8 @@ struct mii_ioctl_notify_s
struct sigevent event; /* Describe the way a task is to be notified */
};
/* Structure passed to read from or write to the MII/PHY management interface via the
* SIOCxMIIREG ioctl commands.
/* Structure passed to read from or write to the MII/PHY management
* interface via the SIOCxMIIREG ioctl commands.
*/
struct mii_ioctl_data_s
@ -148,9 +148,10 @@ struct can_ioctl_data_s
uint16_t data_samplep; /* Data phase sample point % */
};
/* There are two forms of the I/F request structure. One for IPv6 and one for IPv4.
* Notice that they are (and must be) cast compatible and really different only
* in the size of the structure allocation.
/* There are two forms of the I/F request structure.
* One for IPv6 and one for IPv4.
* Notice that they are (and must be) cast compatible and really different
* only in the size of the structure allocation.
*
* This is the I/F request that should be used with IPv6.
*/
@ -258,9 +259,9 @@ struct ifconf
#define ifc_buf ifc_ifcu.ifcu_buf /* Buffer address */
#define ifc_req ifc_ifcu.ifcu_req /* Array of ifreq structures */
/*******************************************************************************************
/****************************************************************************
* Public Function Prototypes
*******************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -270,38 +271,43 @@ extern "C"
#define EXTERN extern
#endif
/*******************************************************************************************
/****************************************************************************
* Name: if_nametoindex
*
* Description:
* The if_nametoindex() function returns the interface index corresponding to name ifname.
* The if_nametoindex() function returns the interface index corresponding
* to name ifname.
*
* Input Parameters:
* ifname - The interface name
*
* Returned Value:
* The corresponding index if ifname is the name of an interface; otherwise, zero.
* The corresponding index if ifname is the name of an interface;
* otherwise, zero.
*
*******************************************************************************************/
****************************************************************************/
unsigned int if_nametoindex(FAR const char *ifname);
/*******************************************************************************************
/****************************************************************************
* Name: if_indextoname
*
* Description:
* The if_indextoname() function maps an interface index to its corresponding name.
* The if_indextoname() function maps an interface index to its
* corresponding name.
*
* Input Parameters:
* ifname - Points to a buffer of at least IF_NAMESIZE bytes. if_indextoname() will
* place in this buffer the name of the interface with index ifindex.
* ifname - Points to a buffer of at least IF_NAMESIZE bytes.
* if_indextoname() will place in this buffer the name
* of the interface with index ifindex.
*
* Returned Value:
* If ifindex is an interface index, then the function will return the value supplied by
* ifname. Otherwise, the function returns a NULL pointer and sets errno to indicate the
* error.
* If ifindex is an interface index, then the function will return the
* value supplied by ifname.
* Otherwise, the function returns a NULL pointer and sets errno to
* indicate the error.
*
*******************************************************************************************/
****************************************************************************/
FAR char *if_indextoname(unsigned int ifindex, FAR char *ifname);

View File

@ -79,10 +79,10 @@
struct arpreq
{
struct sockaddr arp_pa; /* Protocol address */
struct sockaddr arp_ha; /* Hardware address */
struct sockaddr arp_netmask; /* Netmask of protocol address */
uint8_t arp_flags; /* Flags */
struct sockaddr arp_pa; /* Protocol address */
struct sockaddr arp_ha; /* Hardware address */
struct sockaddr arp_netmask; /* Netmask of protocol address */
uint8_t arp_flags; /* Flags */
uint8_t arp_dev[IFNAMSIZ + 1]; /* Device name (zero terminated) */
};

View File

@ -103,14 +103,17 @@
* blocked multicast source */
#define IP_BLOCK_SOURCE (__SO_PROTOCOL + 7) /* Stop receiving multicast
* data from source */
#define IP_ADD_SOURCE_MEMBERSHIP (__SO_PROTOCOL + 8) /* Join a multicast group;
* allow receive only from
* source */
* allow receive only from
* source */
#define IP_DROP_SOURCE_MEMBERSHIP (__SO_PROTOCOL + 9) /* Leave a source-specific
* group. Stop receiving
* data from a given
* multicast group that come
* from a given source */
* group. Stop receiving
* data from a given
* multicast group that come
* from a given source */
#define IP_MSFILTER (__SO_PROTOCOL + 10) /* Access advanced, full-
* state filtering API */
#define IP_MULTICAST_ALL (__SO_PROTOCOL + 11) /* Modify the delivery policy

View File

@ -55,11 +55,12 @@
#define TCP_NODELAY (__SO_PROTOCOL + 0) /* Avoid coalescing of small segments. */
/* "The macro shall be defined in the header. The implementation need not
* allow the value of the option to be set via setsockopt() or retrieved via
* getsockopt()."
* allow the value of the option to be set via setsockopt() or retrieved
* via getsockopt()."
*/
/* Additional TCP protocol socket operations not specified at OpenGroup.org */
/* TCP protocol socket operations needed to support TCP Keep-Alive: */
#define TCP_KEEPIDLE (__SO_PROTOCOL + 1) /* Start keeplives after this IDLE period

View File

@ -1,4 +1,4 @@
/********************************************************************************************
/****************************************************************************
* include/nuttx/input/stmpe811.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -16,7 +16,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*
********************************************************************************************/
****************************************************************************/
/* References:
* "STMPE811 S-Touch advanced resistive touchscreen controller with 8-bit
@ -26,9 +26,9 @@
#ifndef __INCLUDE_NUTTX_INPUT_STMPE811_H
#define __INCLUDE_NUTTX_INPUT_STMPE811_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
@ -39,11 +39,11 @@
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_STMPE811)
/********************************************************************************************
/****************************************************************************
* Pre-processor Definitions
********************************************************************************************/
****************************************************************************/
/* Configuration ****************************************************************************/
/* Configuration ************************************************************/
/* Prerequisites: CONFIG_INPUT=y
*
@ -64,25 +64,27 @@
* CONFIG_STMPE811_GPIO_DISABLE
* Disable driver GPIO functionality.
* CONFIG_STMPE811_GPIOINT_DISABLE
* Disable driver GPIO interrupt functionality (ignored if GPIO functionality is
* disabled).
* Disable driver GPIO interrupt functionality
* (ignored if GPIO functionality is disabled).
* CONFIG_STMPE811_SWAPXY
* Reverse the meaning of X and Y to handle different LCD orientations.
* CONFIG_STMPE811_TEMP_DISABLE
* Disable driver temperature sensor functionality.
* CONFIG_STMPE811_REGDEBUG
* Enable very low register-level debug output. Requires CONFIG_DEBUG_FEATURES.
* Enable very low register-level debug output.
* Requires CONFIG_DEBUG_FEATURES.
* CONFIG_STMPE811_THRESHX and CONFIG_STMPE811_THRESHY
* STMPE811 touchscreen data comes in a a very high rate. New touch positions
* will only be reported when the X or Y data changes by these thresholds.
* This trades reduces data rate for some loss in dragging accuracy. The
* STMPE811 is configure for 12-bit values so the raw ranges are 0-4095. So
* for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
* would correspond to one pixel. Default: 12
* STMPE811 touchscreen data comes in a a very high rate.
* New touch positions will only be reported when the X or Y data changes
* by these thresholds. This trades reduces data rate for some loss in
* dragging accuracy. The STMPE811 is configure for 12-bit values so the
* raw ranges are 0-4095. So for example, if your display is 320x240, then
* THRESHX=13 and THRESHY=17 would correspond to one pixel. Default: 12
*/
/* The STMPE811 interfaces with the target CPU via a I2C or SPI interface. The pin IN_1
* allows the selection of interface protocol at reset state.
/* The STMPE811 interfaces with the target CPU via a I2C or SPI interface.
* The pin IN_1 allows the selection of interface protocol at reset
* state.
*/
#if !defined(CONFIG_STMPE811_SPI) && !defined(CONFIG_STMPE811_I2C)
@ -129,10 +131,11 @@
# undef CONFIG_STMPE811_REGDEBUG
#endif
/* I2C **************************************************************************************/
/* I2C **********************************************************************/
/* STMPE811 Address: The STMPE811 may have 7-bit address 0x41 or 0x44, depending upon the
* state of the ADDR0 pin.
/* STMPE811 Address:
* The STMPE811 may have 7-bit address 0x41 or 0x44, depending upon the state
* of the ADDR0 pin.
*/
#define STMPE811_I2C_ADDRESS_MASK (0x78) /* Bits 3-7: Invariant part of STMPE811 address */
@ -146,7 +149,7 @@
#define STMPE811_I2C_MAXFREQUENCY 400000 /* 400KHz */
/* SPI **************************************************************************************/
/* SPI **********************************************************************/
/* The device always operates in mode 0 */
@ -156,7 +159,7 @@
#define STMPE811_SPI_MAXFREQUENCY 1000000 /* 1MHz */
/* STMPE811 Registers ***********************************************************************/
/* STMPE811 Registers *******************************************************/
/* Register Addresses */
@ -384,9 +387,10 @@
#define TEMP_CTRL_THRES_EN (1 << 3) /* Bit 3: Threshold enable */
#define TEMP_CTRL_THRES_RANGE (1 << 4) /* Bit 4: temperature threshold enable, 0='>=' 1='<' */
/* GPIO Configuration ***********************************************************************/
/* GPIO Configuration *******************************************************/
/* The STMPE811 GPIO interfaces take an 8-bit bit-encoded parameter to describe the GPIO pin.
/* The STMPE811 GPIO interfaces take an 8-bit bit-encoded parameter to
* describe the GPIO pin.
* The following definitions describe the bit-encoding of that parameter.
*
* 7654 3210
@ -432,23 +436,27 @@
# define STMPE811_GPIO_PIN6 (6 << STMPE811_GPIO_PIN_SHIFT)
# define STMPE811_GPIO_PIN7 (7 << STMPE811_GPIO_PIN_SHIFT)
/********************************************************************************************
/****************************************************************************
* Public Types
********************************************************************************************/
****************************************************************************/
/* Form of the GPIO "interrupt handler" callback. Callbacks do not occur from an interrupt
* handler but rather from the context of the worker thread with interrupts enabled.
/* Form of the GPIO "interrupt handler" callback. Callbacks do not occur from
* an interrupt
* handler but rather from the context of the worker thread with interrupts
* enabled.
*/
typedef CODE void (*stmpe811_handler_t)(int pin);
/* A reference to a structure of this type must be passed to the STMPE811 driver when the
* driver is instantiated. This structure provides information about the configuration of the
/* A reference to a structure of this type must be passed to the STMPE811
* driver when the driver is instantiated.
* This structure provides information about the configuration of the
* STMPE811 and provides some board-specific hooks.
*
* Memory for this structure is provided by the caller. It is not copied by the driver
* and is presumed to persist while the driver is active. The memory must be writeable
* because, under certain circumstances, the driver may modify the frequency.
* Memory for this structure is provided by the caller.
* It is not copied by the driver and is presumed to persist while the
* driver is active. The memory must be writeablebecause, under
* certain circumstances, the driver may modify the frequency.
*/
struct stmpe811_config_s
@ -487,22 +495,26 @@ struct stmpe811_config_s
* clear - Acknowledge/clear any pending GPIO interrupt
*/
int (*attach)(FAR struct stmpe811_config_s *state, xcpt_t isr, FAR void *arg);
void (*enable)(FAR struct stmpe811_config_s *state, bool enable);
int (*attach)(FAR struct stmpe811_config_s *state,
xcpt_t isr,
FAR void *arg);
void (*enable)(FAR struct stmpe811_config_s *state,
bool enable);
void (*clear)(FAR struct stmpe811_config_s *state);
};
/* Since the STMPE811 is a multi-function device, no functionality is assumed when the
* device is first created. Rather, a multi-step initialization is required. When
* stmpe811_instantiate is called, it returns a handle of the following type. That handle
* may then be used to enable a configure the STMPE811 functionality.
/* Since the STMPE811 is a multi-function device, no functionality is assumed
* when the device is first created. Rather, a multi-step initialization is
* required. When stmpe811_instantiate is called, it returns a handle of the
* following type. That handle may then be used to enable a configure the
* STMPE811 functionality.
*/
typedef FAR void *STMPE811_HANDLE;
/********************************************************************************************
/****************************************************************************
* Public Function Prototypes
********************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -512,22 +524,23 @@ extern "C"
#define EXTERN extern
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_instantiate
*
* Description:
* Instantiate and configure the STMPE811 device driver to use the provided I2C or SPI
* device instance.
* Instantiate and configure the STMPE811 device driver to use the provided
* I2C or SPI device instance.
*
* Input Parameters:
* dev - An I2C or SPI driver instance
* config - Persistent board configuration data
*
* Returned Value:
* A non-zero handle is returned on success. This handle may then be used to configure
* the STMPE811 driver as necessary. A NULL handle value is returned on failure.
* A non-zero handle is returned on success. This handle may then be used
* to configure the STMPE811 driver as necessary.
* A NULL handle value is returned on failure.
*
********************************************************************************************/
****************************************************************************/
#ifdef CONFIG_STMPE811_SPI
STMPE811_HANDLE stmpe811_instantiate(FAR struct spi_dev_s *dev,
@ -537,11 +550,12 @@ STMPE811_HANDLE stmpe811_instantiate(FAR struct i2c_master_s *dev,
FAR struct stmpe811_config_s *config);
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_register
*
* Description:
* Enable TSC functionality. GPIO4-7 must be available. This function will register the
* Enable TSC functionality.
* GPIO4-7 must be available. This function will register the
* touchscreen driver as /dev/inputN where N is the minor device number
*
* Input Parameters:
@ -549,16 +563,16 @@ STMPE811_HANDLE stmpe811_instantiate(FAR struct i2c_master_s *dev,
* minor - The input device minor number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate
* the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
********************************************************************************************/
****************************************************************************/
#ifndef CONFIG_STMPE811_TSC_DISABLE
int stmpe811_register(STMPE811_HANDLE handle, int minor);
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_gpioconfig
*
* Description:
@ -569,16 +583,16 @@ int stmpe811_register(STMPE811_HANDLE handle, int minor);
* pinconfig - Bit-encoded pin configuration
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate
* the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
********************************************************************************************/
****************************************************************************/
#ifndef CONFIG_STMPE811_GPIO_DISABLE
int stmpe811_gpioconfig(STMPE811_HANDLE handle, uint8_t pinconfig);
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_gpiowrite
*
* Description:
@ -592,13 +606,15 @@ int stmpe811_gpioconfig(STMPE811_HANDLE handle, uint8_t pinconfig);
* Returned Value:
* None
*
********************************************************************************************/
****************************************************************************/
#ifndef CONFIG_STMPE811_GPIO_DISABLE
void stmpe811_gpiowrite(STMPE811_HANDLE handle, uint8_t pinconfig, bool value);
void stmpe811_gpiowrite(STMPE811_HANDLE handle,
uint8_t pinconfig,
bool value);
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_gpioread
*
* Description:
@ -610,24 +626,27 @@ void stmpe811_gpiowrite(STMPE811_HANDLE handle, uint8_t pinconfig, bool value);
* value - The location to return the state of the GPIO pin
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate
* the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
********************************************************************************************/
****************************************************************************/
#ifndef CONFIG_STMPE811_GPIO_DISABLE
int stmpe811_gpioread(STMPE811_HANDLE handle, uint8_t pinconfig, bool *value);
int stmpe811_gpioread(STMPE811_HANDLE handle,
uint8_t pinconfig,
bool *value);
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_gpioattach
*
* Description:
* Attach to a GPIO interrupt input pin and enable interrupts on the pin. Using the value
* NULL for the handler address will disable interrupts from the pin and detach the handler.
* Attach to a GPIO interrupt input pin and enable interrupts on the pin.
* Using the value NULL for the handler address will disable interrupts
* from the pin and detach the handler.
*
* NOTE: Callbacks do not occur from an interrupt handler but rather from the context
* of the worker thread with interrupts enabled.
* NOTE: Callbacks do not occur from an interrupt handler but rather from
* the context of the worker thread with interrupts enabled.
*
* Input Parameters:
* handle - The handle previously returned by stmpe811_instantiate
@ -635,36 +654,37 @@ int stmpe811_gpioread(STMPE811_HANDLE handle, uint8_t pinconfig, bool *value);
* handler - The handler that will be called when the interrupt occurs.
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate
* the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
********************************************************************************************/
****************************************************************************/
#if !defined(CONFIG_STMPE811_GPIO_DISABLE) && !defined(CONFIG_STMPE811_GPIOINT_DISABLE)
int stmpe811_gpioattach(STMPE811_HANDLE handle, uint8_t pinconfig,
stmpe811_handler_t handler);
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_adcinitialize
*
* Description:
* Configure for ADC mode operation. Set overall ADC ADC timing that applies to all pins.
* Configure for ADC mode operation. Set overall ADC ADC timing that applies
* to all pins.
*
* Input Parameters:
* handle - The handle previously returned by stmpe811_instantiate
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate
* the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
********************************************************************************************/
****************************************************************************/
#ifndef CONFIG_STMPE811_ADC_DISABLE
int stmpe811_adcinitialize(STMPE811_HANDLE handle);
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_adcconfig
*
* Description:
@ -675,16 +695,16 @@ int stmpe811_adcinitialize(STMPE811_HANDLE handle);
* pin - The ADC pin number
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate
* the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
********************************************************************************************/
****************************************************************************/
#ifndef CONFIG_STMPE811_ADC_DISABLE
int stmpe811_adcconfig(STMPE811_HANDLE handle, int pin);
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_adcread
*
* Description:
@ -697,13 +717,13 @@ int stmpe811_adcconfig(STMPE811_HANDLE handle, int pin);
* Returned Value:
* The converted value (there is no error reporting mechanism).
*
********************************************************************************************/
****************************************************************************/
#ifndef CONFIG_STMPE811_ADC_DISABLE
uint16_t stmpe811_adcread(STMPE811_HANDLE handle, int pin);
#endif
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_tempinitialize
*
* Description:
@ -713,14 +733,14 @@ uint16_t stmpe811_adcread(STMPE811_HANDLE handle, int pin);
* handle - The handle previously returned by stmpe811_instantiate
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate
* the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
********************************************************************************************/
****************************************************************************/
int stmpe811_tempinitialize(STMPE811_HANDLE handle);
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_tempread
*
* Description:
@ -730,14 +750,14 @@ int stmpe811_tempinitialize(STMPE811_HANDLE handle);
* handle - The handle previously returned by stmpe811_instantiate
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate
* the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
********************************************************************************************/
****************************************************************************/
uint16_t stmpe811_tempread(STMPE811_HANDLE handle);
/********************************************************************************************
/****************************************************************************
* Name: stmpe811_tempinterrupt
*
* Description:
@ -755,10 +775,10 @@ uint16_t stmpe811_tempread(STMPE811_HANDLE handle);
* the temperature crosses the threshold.
*
* Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate
* the nature of the failure.
* Zero is returned on success. Otherwise, a negated errno value is
* returned to indicate the nature of the failure.
*
********************************************************************************************/
****************************************************************************/
/* Not implemented */

View File

@ -1,4 +1,4 @@
/**************************************************************************************
/****************************************************************************
* include/nuttx/lcd/ili9341.h
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
@ -32,26 +32,26 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_LCD_ILI9341_H
#define __INCLUDE_NUTTX_LCD_ILI9341_H
/**************************************************************************************
/****************************************************************************
* Included Files
**************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
/**************************************************************************************
/****************************************************************************
* Pre-processor Definitions
**************************************************************************************/
****************************************************************************/
/* ILI9341 ID code */
#define ILI9341_DEVICE_CODE 0x9341
/* ILI9341 LCD Register Addresses *****************************************************/
/* ILI9341 LCD Register Addresses *******************************************/
/* Level 1 commands */
@ -142,7 +142,7 @@
#define ILI9341_INTERFACE_CONTROL 0xf6 /* Interface control */
#define ILI9341_PUMP_RATIO_CONTROL 0xf7 /* Pump ration control */
/* ILI9341 LCD Register Bit Definitions ***********************************************/
/* ILI9341 LCD Register Bit Definitions *************************************/
/* Pixel format set */
@ -205,15 +205,16 @@
#define ILI9341_INTERFACE_CONTROL_RCM(n) ((n) << ILI9341_INTERFACE_CONTROL_RCM_SHIFT)
#define ILI9341_INTERFACE_CONTROL_BPASS (1 << 7)
/**************************************************************************************
/****************************************************************************
* Public Types
**************************************************************************************/
****************************************************************************/
struct ili9341_lcd_s
{
/* Interface to control the ILI9341 lcd driver
*
* - select Select the device (as necessary) before performing any operations.
* - select Select the device (as necessary) before performing any
* operations.
* - deselect Deselect the device (as necessary).
* - sendcmd Send specific command to the LCD driver.
* - sendparam Send specific parameter to the LCD driver.
@ -242,9 +243,9 @@ struct ili9341_lcd_s
/* mcu interface specific data following */
};
/**************************************************************************************
/****************************************************************************
* Public Data
**************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -254,11 +255,11 @@ extern "C"
#define EXTERN extern
#endif
/**************************************************************************************
/****************************************************************************
* Public Function Prototypes
**************************************************************************************/
****************************************************************************/
/**************************************************************************************
/****************************************************************************
* Name: ili9341_initialize
*
* Description:
@ -269,28 +270,29 @@ extern "C"
*
* Input Parameters:
*
* lcd - A reference to the platform specific driver instance to control the
* ili9341 display driver.
* lcd - A reference to the platform specific driver instance to control
* the ili9341 display driver.
* devno - A value in the range of 0 through CONFIG_ILI9341_NINTERFACES-1.
* This allows support for multiple LCD devices.
*
* Returned Value:
*
* On success, this function returns a reference to the LCD driver object for
* the specified LCD driver. NULL is returned on any failure.
* On success, this function returns a reference to the LCD driver object
* for the specified LCD driver. NULL is returned on any failure.
*
**************************************************************************************/
****************************************************************************/
FAR struct lcd_dev_s *ili9341_initialize(FAR struct ili9341_lcd_s *lcd, int devno);
FAR struct lcd_dev_s *ili9341_initialize(FAR struct ili9341_lcd_s *lcd,
int devno);
/**************************************************************************************
/****************************************************************************
* Name: ili9341_clear
*
* Description:
* This is a non-standard LCD interface. Because of the various rotations, clearing
* the display in the normal way by writing a sequences of runs that covers the
* entire display can be very slow. Here the display is cleared by simply setting
* all GRAM memory to the specified color.
* This is a non-standard LCD interface. Because of the various rotations,
* clearing the display in the normal way by writing a sequences of runs
* that covers the entire display can be very slow. Here the display is
* cleared by simply setting all GRAM memory to the specified color.
*
* Input Parameters:
* dev - A reference to the lcd driver structure
@ -301,7 +303,7 @@ FAR struct lcd_dev_s *ili9341_initialize(FAR struct ili9341_lcd_s *lcd, int devn
* On success - OK
* On error - -EINVAL
*
**************************************************************************************/
****************************************************************************/
int ili9341_clear(FAR struct lcd_dev_s *dev, uint16_t color);
#undef EXTERN

View File

@ -1,7 +1,8 @@
/**************************************************************************************
/****************************************************************************
* include/nuttx/lcd/mio283qt2.h
*
* Interface definition for the MI0283QT-2 LCD from Multi-Inno Technology Co., Ltd.
* Interface definition for the
* MI0283QT-2 LCD from Multi-Inno Technology Co., Ltd.
* This LCD is based on the Himax HX8347-D LCD controller.
*
* Licensed to the Apache Software Foundation (ASF) under one or more
@ -19,60 +20,65 @@
* License for the specific language governing permissions and limitations
* under the License.
*
**************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_LCD_MIO283QT2_H
#define __INCLUDE_NUTTX_LCD_MIO283QT2_H
/**************************************************************************************
/****************************************************************************
* Included Files
**************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#ifdef CONFIG_LCD_MIO283QT2
/**************************************************************************************
/****************************************************************************
* Pre-processor Definitions
**************************************************************************************/
****************************************************************************/
/* Configuration **********************************************************************/
/* Configuration ************************************************************/
/* CONFIG_LCD_MIO283QT2 - Enables support for the MIO283QT2-based LCD.
* CONFIG_LCD_NOGETRUN
* NX components need to know if it can read from the LCD or not. If reading from the
* LCD is supported then some graphic operations can be improved. Default: Supported
* CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" support. Default is
* this 320x240 "landscape" orientation.
* CONFIG_LCD_RLANDSCAPE - Define for 320x240 display "reverse landscape" support.
* NX components need to know if it can read from the LCD or not.
* If reading from the LCD is supported then some graphic operations
* can be improved. Default: Supported
* CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" support.
* Default is this 320x240 "landscape" orientation.
* CONFIG_LCD_RLANDSCAPE - Define for 320x240 display "reverse landscape"
* support.
* Default is this 320x240 "landscape" orientation
* CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" orientation support.
* CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" orientation
* support.
* Default is this 320x240 "landscape" orientation
* CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse portrait" orientation
* support. Default is this 320x240 "landscape" orientation
* CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse portrait"
* orientation support. Default is this 320x240 "landscape" orientation
*/
/**************************************************************************************
/****************************************************************************
* Public Types
**************************************************************************************/
****************************************************************************/
/* This structure defines the interface to the LCD provided by the platform. The
* nature of this interface is hidden from the MIO283QT2 driver.
/* This structure defines the interface to the LCD provided by the platform.
* The nature of this interface is hidden from the MIO283QT2 driver.
*/
struct mio283qt2_lcd_s
{
/* Interface to write to a MIO283QT2 register.
*
* - select Select the device (as necessary). The meaning of selecting (and
* and deselecting) is not defined. select() will be called before
* starting any sequence of operations. deselect() when that sequence
* - select Select the device (as necessary).
* The meaning of selecting (and and deselecting) is not
* defined. select() will be called before starting any
* sequence of operations. deselect() when that sequence
* of operations is complete.
* - deselect Deselect the device (as necessary)
* - index Set register index
* - read Read data from the LCD (auto-incrementing)
* - write Write data to the LCD (auto-incrementing)
* - backlight Set the backlight power level (0=OFF; CONFIG_LCD_MAXPOWER=MAX)
* - backlight Set the backlight power level
* (0=OFF; CONFIG_LCD_MAXPOWER=MAX)
*/
void (*select)(FAR struct mio283qt2_lcd_s *dev);
@ -87,9 +93,9 @@ struct mio283qt2_lcd_s
/* platform-specific data may follow */
};
/**************************************************************************************
/****************************************************************************
* Public Data
**************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -99,32 +105,33 @@ extern "C"
#define EXTERN extern
#endif
/**************************************************************************************
/****************************************************************************
* Public Function Prototypes
**************************************************************************************/
****************************************************************************/
/**************************************************************************************
/****************************************************************************
* Name: mio283qt2_lcdinitialize
*
* Description:
* Initialize the LCD video hardware. The initial state of the LCD is fully
* initialized, display memory cleared, and the LCD ready to use, but with the power
* setting at 0 (full off).
* Initialize the LCD video hardware. The initial state of the LCD is fully
* initialized, display memory cleared, and the LCD ready to use, but with
* the power setting at 0 (full off).
*
**************************************************************************************/
****************************************************************************/
FAR struct lcd_dev_s *mio283qt2_lcdinitialize(FAR struct mio283qt2_lcd_s *lcd);
FAR struct lcd_dev_s *mio283qt2_lcdinitialize(
FAR struct mio283qt2_lcd_s *lcd);
/**************************************************************************************
/****************************************************************************
* Name: mio283qt2_clear
*
* Description:
* This is a non-standard LCD interface. Because of the various rotations, clearing
* the display in the normal way by writing a sequences of runs that covers the
* entire display can be very slow. Here the display is cleared by simply setting
* all GRAM memory to the specified color.
* This is a non-standard LCD interface. Because of the various rotations,
* clearing the display in the normal way by writing a sequences of runs
* that covers the entire display can be very slow. Here the display is
* cleared by simply setting all GRAM memory to the specified color.
*
**************************************************************************************/
****************************************************************************/
void mio283qt2_clear(FAR struct lcd_dev_s *dev, uint16_t color);

View File

@ -1,7 +1,8 @@
/**************************************************************************************
/****************************************************************************
* include/nuttx/lcd/mio283qt9a.h
*
* Interface definition for the MI0283QT-9A LCD from Multi-Inno Technology Co., Ltd.
* Interface definition for
* the MI0283QT-9A LCD from Multi-Inno Technology Co., Ltd.
* This LCD is based on the Ilitek ILI9341 LCD controller.
*
* Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved.
@ -35,60 +36,63 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_LCD_MIO283QT9A_H
#define __INCLUDE_NUTTX_LCD_MIO283QT9A_H
/**************************************************************************************
/****************************************************************************
* Included Files
**************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#ifdef CONFIG_LCD_MIO283QT9A
/**************************************************************************************
/****************************************************************************
* Pre-processor Definitions
**************************************************************************************/
****************************************************************************/
/* Configuration **********************************************************************/
/* Configuration ************************************************************/
/* CONFIG_LCD_MIO283QT9A - Enables support for the MIO283QT9A-based LCD.
* CONFIG_LCD_NOGETRUN
* NX components need to know if it can read from the LCD or not. If reading from the
* LCD is supported then some graphic operations can be improved. Default: Supported
* CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" support. Default is
* this 320x240 "landscape" orientation.
* CONFIG_LCD_RLANDSCAPE - Define for 320x240 display "reverse landscape" support.
* Default is this 320x240 "landscape" orientation
* CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" orientation support.
* Default is this 320x240 "landscape" orientation
* CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse portrait" orientation
* support. Default is this 320x240 "landscape" orientation
* NX components need to know if it can read from the LCD or not.
* If reading from the LCD is supported then some graphic operations
* can be improved. Default: Supported
* CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" support.
* Default is this 320x240 "landscape" orientation.
* CONFIG_LCD_RLANDSCAPE - Define for 320x240 display "reverse landscape"
* support. Default is this 320x240 "landscape" orientation
* CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" orientation
* support. Default is this 320x240 "landscape" orientation
* CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse portrait"
* orientation support. Default is this 320x240 "landscape" orientation
*/
/**************************************************************************************
/****************************************************************************
* Public Types
**************************************************************************************/
****************************************************************************/
/* This structure defines the interface to the LCD provided by the platform. The
* nature of this interface is hidden from the MIO283QT2 driver.
/* This structure defines the interface to the LCD provided by the platform.
* The nature of this interface is hidden from the MIO283QT2 driver.
*/
struct mio283qt9a_lcd_s
{
/* Interface to write to a MIO283QT9A register.
*
* - select Select the device (as necessary). The meaning of selecting (and
* and deselecting) is not defined. select() will be called before
* starting any sequence of operations. deselect() when that sequence
* - select Select the device (as necessary).
* The meaning of selecting (and and deselecting) is not
* defined. select() will be called before starting any
* sequence of operations. deselect() when that sequence
* of operations is complete.
* - deselect Deselect the device (as necessary)
* - index Set register index
* - read Read data from the LCD (auto-incrementing)
* - write Write data to the LCD (auto-incrementing)
* - backlight Set the backlight power level (0=OFF; CONFIG_LCD_MAXPOWER=MAX)
* - backlight Set the backlight power level
* (0=OFF; CONFIG_LCD_MAXPOWER=MAX)
*/
void (*select)(FAR struct mio283qt9a_lcd_s *dev);
@ -104,9 +108,9 @@ struct mio283qt9a_lcd_s
/* platform-specific data may follow */
};
/**************************************************************************************
/****************************************************************************
* Public Data
**************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -116,32 +120,33 @@ extern "C"
#define EXTERN extern
#endif
/**************************************************************************************
/****************************************************************************
* Public Function Prototypes
**************************************************************************************/
****************************************************************************/
/**************************************************************************************
/****************************************************************************
* Name: mio283qt2_lcdinitialize
*
* Description:
* Initialize the LCD video hardware. The initial state of the LCD is fully
* initialized, display memory cleared, and the LCD ready to use, but with the power
* setting at 0 (full off).
* Initialize the LCD video hardware. The initial state of the LCD is fully
* initialized, display memory cleared, and the LCD ready to use, but with
* the power setting at 0 (full off).
*
**************************************************************************************/
****************************************************************************/
FAR struct lcd_dev_s *mio283qt2_lcdinitialize(FAR struct mio283qt9a_lcd_s *lcd);
FAR struct lcd_dev_s *mio283qt2_lcdinitialize(
FAR struct mio283qt9a_lcd_s *lcd);
/**************************************************************************************
/****************************************************************************
* Name: mio283qt2_clear
*
* Description:
* This is a non-standard LCD interface. Because of the various rotations, clearing
* the display in the normal way by writing a sequences of runs that covers the
* entire display can be very slow. Here the display is cleared by simply setting
* all GRAM memory to the specified color.
* This is a non-standard LCD interface. Because of the various rotations,
* clearing the display in the normal way by writing a sequences of runs
* that covers the entire display can be very slow. Here the display is
* cleared by simply setting all GRAM memory to the specified color.
*
**************************************************************************************/
****************************************************************************/
void mio283qt2_clear(FAR struct lcd_dev_s *dev, uint16_t color);

View File

@ -1,4 +1,4 @@
/**************************************************************************************
/****************************************************************************
* include/nuttx/lcd/ra8875.h
* Definitions for the RAiO Technologies RA8875 LCD controller
*
@ -34,51 +34,56 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_LCD_RA8875_H
#define __INCLUDE_NUTTX_LCD_RA8875_H
/**************************************************************************************
/****************************************************************************
* Included Files
**************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#ifdef CONFIG_LCD_RA8875
/**************************************************************************************
/****************************************************************************
* Pre-processor Definitions
**************************************************************************************/
****************************************************************************/
/* Configuration **********************************************************************/
/* Configuration ************************************************************/
/* CONFIG_LCD_RA8875 - Enables support for the RA8875-based LCD.
* CONFIG_LCD_NOGETRUN
* NX components need to know if it can read from the LCD or not. If reading from the
* LCD is supported then some graphic operations can be improved. Default: Supported
* CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" support. Default is
* this 320x240 "landscape" orientation.
* CONFIG_LCD_RLANDSCAPE - Define for 320x240 display "reverse landscape" support.
* Default is this 320x240 "landscape" orientation
* CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" orientation support.
* Default is this 320x240 "landscape" orientation
* CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse portrait" orientation
* support. Default is this 320x240 "landscape" orientation
* NX components need to know if it can read from the LCD or not.
* If reading from the LCD is supported then some graphic operations can be
* improved. Default: Supported
* CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" support.
* Default is this 320x240 "landscape" orientation.
* CONFIG_LCD_RLANDSCAPE - Define for 320x240 display "reverse landscape"
* support. Default is this 320x240 "landscape" orientation
* CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" orientation
* support. Default is this 320x240 "landscape" orientation
* CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse portrait"
* orientation support. Default is this 320x240 "landscape" orientation
*/
/**************************************************************************************
/****************************************************************************
* Public Types
**************************************************************************************/
****************************************************************************/
/* This structure defines the interface to the LCD provided by the platform. The
* nature of this interface is hidden from the RA8875 driver.
/* This structure defines the interface to the LCD provided by the platform.
* The nature of this interface is hidden from the RA8875 driver.
*/
struct ra8875_lcd_s
{
void (*write_reg)(FAR struct ra8875_lcd_s *dev, uint8_t regnum, uint8_t data);
void (*write_reg16)(FAR struct ra8875_lcd_s *dev, uint8_t regnum, uint16_t data);
void (*write_reg)(FAR struct ra8875_lcd_s *dev,
uint8_t regnum,
uint8_t data);
void (*write_reg16)(FAR struct ra8875_lcd_s *dev,
uint8_t regnum,
uint16_t data);
uint8_t (*read_reg)(FAR struct ra8875_lcd_s *dev, uint8_t regnum);
uint8_t (*read_status)(FAR struct ra8875_lcd_s *dev);
@ -97,9 +102,9 @@ struct ra8875_lcd_s
/* platform-specific data may follow */
};
/**************************************************************************************
/****************************************************************************
* Public Data
**************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -109,79 +114,84 @@ extern "C"
#define EXTERN extern
#endif
/**************************************************************************************
/****************************************************************************
* Public Function Prototypes
**************************************************************************************/
****************************************************************************/
/**************************************************************************************
/****************************************************************************
* Name: ra8875_lcdinitialize
*
* Description:
* Initialize the LCD video hardware. The initial state of the LCD is fully
* initialized, display memory cleared, and the LCD ready to use, but with the power
* setting at 0 (full off).
* Initialize the LCD video hardware. The initial state of the LCD is fully
* initialized, display memory cleared, and the LCD ready to use, but with
* the power setting at 0 (full off).
*
**************************************************************************************/
****************************************************************************/
FAR struct lcd_dev_s *ra8875_lcdinitialize(FAR struct ra8875_lcd_s *lcd);
/**************************************************************************************
/****************************************************************************
* Name: ra8875_clear
*
* Description:
* This is a non-standard LCD interface just for the RA8875. Because
* of the various rotations, clearing the display in the normal way by writing a
* sequences of runs that covers the entire display can be very slow. Here the
* display is cleared by simply setting all video memory to the specified color.
* of the various rotations, clearing the display in the normal way by
* writing a sequences of runs that covers the entire display can be very
* slow. Here the display is cleared by simply setting all video memory to
* the specified color.
*
* NOTE: This function is not available to applications in the protected or kernel
* build modes.
* NOTE: This function is not available to applications in the protected or
* kernel build modes.
*
**************************************************************************************/
****************************************************************************/
void ra8875_clear(FAR struct lcd_dev_s *dev, uint16_t color);
/**************************************************************************************
/****************************************************************************
* Name: ra8875_drawrectangle
*
* Description:
* This is a non-standard function to draw a rectangle on the LCD. This function is
* also used internally as part of the ra8875_clear implementation.
* This is a non-standard function to draw a rectangle on the LCD.
* This function is also used internally as part of the ra8875_clear
* implementation.
*
* NOTE: This non-standard function is not available to applications in the
* protected or kernel build modes.
*
**************************************************************************************/
****************************************************************************/
void ra8875_drawrectangle(FAR struct lcd_dev_s *dev, uint16_t x, uint16_t y,
uint16_t width, uint16_t height, uint16_t color, bool fill);
uint16_t width, uint16_t height,
uint16_t color, bool fill);
/**************************************************************************************
/****************************************************************************
* Name: ra8875_drawline
*
* Description:
* This is a non-standard function to draw a line on the LCD. This function is
* also used internally as part of the ra8875_rectandle implementation.
* This is a non-standard function to draw a line on the LCD. This function
* is also used internally as part of the ra8875_rectandle implementation.
*
* NOTE: This non-standard function is not available to applications in the
* protected or kernel build modes.
*
**************************************************************************************/
****************************************************************************/
void ra8875_drawline(FAR struct lcd_dev_s *dev, uint16_t x1, uint16_t y1, uint16_t x2,
void ra8875_drawline(FAR struct lcd_dev_s *dev, uint16_t x1,
uint16_t y1, uint16_t x2,
uint16_t y2, uint16_t color);
/**************************************************************************************
/****************************************************************************
* Name: ra8875_drawtriangle
*
* Description:
* This is a non-standard function to draw a triangle on the LCD. This function is
* also used internally as part of the ra8875_rectandle implementation.
* This is a non-standard function to draw a triangle on the LCD.
* This function is also used internally as part of the ra8875_rectandle
* implementation.
*
* NOTE: This non-standard function is not available to applications in the
* protected or kernel build modes.
*
**************************************************************************************/
****************************************************************************/
#ifdef CONFIG_LCD_RA8875_EXTENDED
void ra8875_drawtriangle(FAR struct lcd_dev_s *dev, uint16_t x0, uint16_t y0,
@ -189,17 +199,18 @@ void ra8875_drawtriangle(FAR struct lcd_dev_s *dev, uint16_t x0, uint16_t y0,
uint16_t color, bool fill);
#endif
/**************************************************************************************
/****************************************************************************
* Name: ra8875_drawcircle
*
* Description:
* This is a non-standard function to draw a circle on the LCD. This function is
* also used internally as part of the ra8875_rectandle implementation.
* This is a non-standard function to draw a circle on the LCD.
* This function is also used internally as part of the ra8875_rectandle
* implementation.
*
* NOTE: This non-standard function is not available to applications in the
* protected or kernel build modes.
*
**************************************************************************************/
****************************************************************************/
#ifdef CONFIG_LCD_RA8875_EXTENDED
void ra8875_drawcircle(FAR struct lcd_dev_s *dev, uint16_t x, uint16_t y,

View File

@ -1,4 +1,4 @@
/**************************************************************************************
/****************************************************************************
* include/nuttx/lcd/ssd1289.h
* Definitions for the Solomon Systech SSD1289 LCD controller
*
@ -17,60 +17,63 @@
* License for the specific language governing permissions and limitations
* under the License.
*
**************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_LCD_SSD1289_H
#define __INCLUDE_NUTTX_LCD_SSD1289_H
/**************************************************************************************
/****************************************************************************
* Included Files
**************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#ifdef CONFIG_LCD_SSD1289
/**************************************************************************************
/****************************************************************************
* Pre-processor Definitions
**************************************************************************************/
****************************************************************************/
/* Configuration **********************************************************************/
/* Configuration ************************************************************/
/* CONFIG_LCD_SSD1289 - Enables support for the SSD1289-based LCD.
* CONFIG_LCD_NOGETRUN
* NX components need to know if it can read from the LCD or not. If reading from the
* LCD is supported then some graphic operations can be improved. Default: Supported
* CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" support. Default is
* this 320x240 "landscape" orientation.
* CONFIG_LCD_RLANDSCAPE - Define for 320x240 display "reverse landscape" support.
* Default is this 320x240 "landscape" orientation
* CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" orientation support.
* Default is this 320x240 "landscape" orientation
* CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse portrait" orientation
* support. Default is this 320x240 "landscape" orientation
* NX components need to know if it can read from the LCD or not.
* If reading from the LCD is supported then some graphic operations
* can be improved. Default: Supported
* CONFIG_LCD_LANDSCAPE - Define for 320x240 display "landscape" support.
* Default is this 320x240 "landscape" orientation.
* CONFIG_LCD_RLANDSCAPE - Define for 320x240 display "reverse landscape"
* support. Default is this 320x240 "landscape" orientation
* CONFIG_LCD_PORTRAIT - Define for 240x320 display "portrait" orientation
* support. Default is this 320x240 "landscape" orientation
* CONFIG_LCD_RPORTRAIT - Define for 240x320 display "reverse portrait"
* orientation support. Default is this 320x240 "landscape" orientation
*/
/**************************************************************************************
/****************************************************************************
* Public Types
**************************************************************************************/
****************************************************************************/
/* This structure defines the interface to the LCD provided by the platform. The
* nature of this interface is hidden from the SSD1289 driver.
/* This structure defines the interface to the LCD provided by the platform.
* The nature of this interface is hidden from the SSD1289 driver.
*/
struct ssd1289_lcd_s
{
/* Interface to write to a SSD1289 register.
*
* - select Select the device (as necessary). The meaning of selecting (and
* and deselecting) is not defined. select() will be called before
* starting any sequence of operations. deselect() when that sequence
* - select Select the device (as necessary).
* The meaning of selecting (and and deselecting) is not
* defined. select() will be called before starting any
* sequence of operations. deselect() when that sequence
* of operations is complete.
* - deselect Deselect the device (as necessary)
* - index Set register index
* - read Read data from the LCD (auto-incrementing)
* - write Write data to the LCD (auto-incrementing)
* - backlight Set the backlight power level (0=OFF; CONFIG_LCD_MAXPOWER=MAX)
* - backlight Set the backlight power level
* (0=OFF; CONFIG_LCD_MAXPOWER=MAX)
*/
void (*select)(FAR struct ssd1289_lcd_s *dev);
@ -85,9 +88,9 @@ struct ssd1289_lcd_s
/* platform-specific data may follow */
};
/**************************************************************************************
/****************************************************************************
* Public Data
**************************************************************************************/
****************************************************************************/
#ifdef __cplusplus
#define EXTERN extern "C"
@ -97,32 +100,33 @@ extern "C"
#define EXTERN extern
#endif
/**************************************************************************************
/****************************************************************************
* Public Function Prototypes
**************************************************************************************/
****************************************************************************/
/**************************************************************************************
/****************************************************************************
* Name: ssd1289_lcdinitialize
*
* Description:
* Initialize the LCD video hardware. The initial state of the LCD is fully
* initialized, display memory cleared, and the LCD ready to use, but with the power
* setting at 0 (full off).
* Initialize the LCD video hardware.
* The initial state of the LCD is fully initialized, display memory
* cleared, and the LCD ready to use, but with the power setting at 0
* (full off).
*
**************************************************************************************/
****************************************************************************/
FAR struct lcd_dev_s *ssd1289_lcdinitialize(FAR struct ssd1289_lcd_s *lcd);
/**************************************************************************************
/****************************************************************************
* Name: ssd1289_clear
*
* Description:
* This is a non-standard LCD interface. Because of the various rotations, clearing
* the display in the normal way by writing a sequences of runs that covers the
* entire display can be very slow. Here the display is cleared by simply setting
* all GRAM memory to the specified color.
* This is a non-standard LCD interface. Because of the various rotations,
* clearing the display in the normal way by writing a sequences of runs
* that covers the entire display can be very slow. Here the display is
* cleared by simply setting all GRAM memory to the specified color.
*
**************************************************************************************/
****************************************************************************/
void ssd1289_clear(FAR struct lcd_dev_s *dev, uint16_t color);

View File

@ -262,7 +262,8 @@ extern "C"
# define EXTERN extern
#endif
typedef CODE int (*wait_cc1101_ready)(FAR struct cc1101_dev_s *dev, uint32_t);
typedef CODE int (*wait_cc1101_ready)(FAR struct cc1101_dev_s *dev,
uint32_t);
struct cc1101_dev_s;
struct cc1101_ops_s
@ -291,10 +292,10 @@ struct cc1101_dev_s
uint8_t flags;
uint8_t channel;
uint8_t power;
uint32_t dev_id; /*SPI device Id*/
uint32_t gdo; /*GDO for interrupt*/
uint32_t isr_pin; /*ISR Pin*/
uint32_t miso_pin; /*MISO Pin*/
uint32_t dev_id; /* SPI device Id */
uint32_t gdo; /* GDO for interrupt */
uint32_t isr_pin; /* ISR Pin */
uint32_t miso_pin; /* MISO Pin */
struct work_s irq_work; /* Interrupt handling "bottom half" */
uint8_t nopens; /* The number of times the device has been opened */
sem_t devsem; /* Ensures exclusive access to this structure */
@ -388,10 +389,10 @@ struct c1101_rfsettings_s
*
* Frequency bands for non-specific short range devices in Europe:
*
* Frequency ERP Duty Cycle Bandwidth Remarks
* 868 868.6 MHz +14 dBm < 1% No limits
* 868.7 869.2 MHz +14 dBm < 0.1% No limits
* 869.3 869.4 MHz +10 dBm No limits < 25 kHz Appropriate access
* Frequency ERP Duty Cycle Bandwidth Remarks
* 868 868.6 MHz +14 dBm < 1% No limits
* 868.7 869.2 MHz +14 dBm < 0.1% No limits
* 869.3 869.4 MHz +10 dBm No limits < 25 kHz Appropriate access
* protocol required 869.4 869.65 MHz +27 dBm < 10% < 25 kHz
* Channels may be combined to one high speed channel 869.7 -870 MHz +7
* dBm No limits No limits
@ -497,7 +498,9 @@ int cc1101_powerdown(FAR struct cc1101_dev_s *dev);
* Set Multi Purpose Output Function. Returns zero on success.
****************************************************************************/
int cc1101_setgdo(FAR struct cc1101_dev_s *dev, uint8_t pin, uint8_t function);
int cc1101_setgdo(FAR struct cc1101_dev_s *dev,
uint8_t pin,
uint8_t function);
/****************************************************************************
* Set RF settings. Use one from the database above.

View File

@ -59,7 +59,7 @@ extern "C"
* Public Function Prototypes
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Name: bcmf_board_initialize
*
* Description:
@ -70,11 +70,11 @@ extern "C"
* minor - zero based minor device number which is unique
* for each wlan device.
*
************************************************************************************/
****************************************************************************/
void bcmf_board_initialize(int minor);
/************************************************************************************
/****************************************************************************
* Name: bcmf_board_power
*
* Description:
@ -86,11 +86,11 @@ void bcmf_board_initialize(int minor);
* for each wlan device.
* power - true to power WLAN chip else false
*
************************************************************************************/
****************************************************************************/
void bcmf_board_power(int minor, bool power);
/************************************************************************************
/****************************************************************************
* Name: bcmf_board_reset
*
* Description:
@ -102,11 +102,11 @@ void bcmf_board_power(int minor, bool power);
* for each wlan device.
* reset - true to set WLAN chip in reset state else false
*
************************************************************************************/
****************************************************************************/
void bcmf_board_reset(int minor, bool reset);
/************************************************************************************
/****************************************************************************
* Function: bcmf_board_setup_oob_irq
*
* Description:
@ -119,7 +119,7 @@ void bcmf_board_reset(int minor, bool reset);
* func - WLAN chip callback function that must be called on gpio event
* arg - WLAN chip internal structure that must be passed to callback
*
************************************************************************************/
****************************************************************************/
void bcmf_board_setup_oob_irq(int minor, int (*func)(void *), void *arg);

View File

@ -113,7 +113,8 @@ static __inline int ieee80211_is_8021x_akm(enum ieee80211_akm akm)
static __inline int ieee80211_is_sha256_akm(enum ieee80211_akm akm)
{
return akm == IEEE80211_AKM_SHA256_8021X || akm == IEEE80211_AKM_SHA256_PSK;
return akm == IEEE80211_AKM_SHA256_8021X ||
akm == IEEE80211_AKM_SHA256_PSK;
}
#endif /* __INCLUDE_NUTTX_WIRELESS_IEEE80211_IEEE80211_CRYPTO_H */

View File

@ -1,8 +1,55 @@
#ifndef caca
#define caca
/****************************************************************************
* include/nuttx/wireless/ieee80211/mmc_sdio.h
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Simon Piriou <spiriou31@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/
#ifndef __INCLUDE_NUTTX_WIRELESS_IEEE80211_MMC_SDIO_H
#define __INCLUDE_NUTTX_WIRELESS_IEEE80211_MMC_SDIO_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <stdint.h>
#include <nuttx/sdio.h>
#ifndef caca
#define caca
/****************************************************************************
* Public Functions Definitions
****************************************************************************/
int sdio_probe(FAR struct sdio_dev_s *dev);
int sdio_set_wide_bus(struct sdio_dev_s *dev);
@ -14,11 +61,12 @@ int sdio_enable_function(FAR struct sdio_dev_s *dev, uint8_t function);
int sdio_enable_interrupt(FAR struct sdio_dev_s *dev, uint8_t function);
int sdio_sendcmdpoll(FAR struct sdio_dev_s *dev, uint32_t cmd, uint32_t arg);
int sdio_sendcmdpoll(FAR struct sdio_dev_s *dev,
uint32_t cmd, uint32_t arg);
int sdio_io_rw_direct(FAR struct sdio_dev_s *dev, bool write,
uint8_t function, uint32_t address,
uint8_t inb, uint8_t* outb);
uint8_t inb, uint8_t *outb);
int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write,
uint8_t function, uint32_t address,
@ -26,3 +74,5 @@ int sdio_io_rw_extended(FAR struct sdio_dev_s *dev, bool write,
unsigned int blocklen, unsigned int nblocks);
#endif
#endif /* __INCLUDE_NUTTX_WIRELESS_IEEE80211_MMC_SDIO_H */

View File

@ -52,12 +52,13 @@
* following structure provides an MCU-independent mechanixm for controlling
* the at86rf23x GPIO interrupt.
*
* The at86rf23x interrupt is an active low, *level* interrupt. From Datasheet:
* The at86rf23x interrupt is an active low, *level* interrupt.
* From Datasheet:
* "Note 1: The INTEDGE polarity defaults to: 0 = Falling Edge. Ensure that
* the interrupt polarity matches the interrupt pin polarity of the host
* microcontroller.
* "Note 2: The INT pin will remain high or low, depending on INTEDGE polarity
* setting, until INTSTAT register is read."
* "Note 2: The INT pin will remain high or low, depending on INTEDGE
* polarity setting, until INTSTAT register is read."
*/
struct at86rf23x_lower_s
@ -85,8 +86,8 @@ extern "C"
* Function: at86rf23x_init
*
* Description:
* Initialize the IEEE802.15.4 driver. The at86rf23x device is assumed to be
* in the post-reset state upon entry to this function.
* Initialize the IEEE802.15.4 driver. The at86rf23x device is assumed to
* be in the post-reset state upon entry to this function.
*
* Input Parameters:
* spi - A reference to the platform's SPI driver for the at86rf23x

View File

@ -1,4 +1,4 @@
/************************************************************************************
/****************************************************************************
* include/nuttx/wireless/ieee802154/ieee802154_device.h
* IEEE802.15.4 character driver
*
@ -32,14 +32,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_DEVICE_H
#define __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_DEVICE_H
/************************************************************************************
/****************************************************************************
* Included Files
************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/wireless/ioctl.h>
@ -48,13 +48,13 @@
#ifdef CONFIG_WIRELESS_IEEE802154
/************************************************************************************
/****************************************************************************
* Pre-processor Definitions
************************************************************************************/
****************************************************************************/
/************************************************************************************
/****************************************************************************
* Public Types
************************************************************************************/
****************************************************************************/
struct mac802154dev_txframe_s
{
@ -69,9 +69,9 @@ struct mac802154dev_rxframe_s
uint8_t payload[IEEE802154_MAX_PHY_PACKET_SIZE];
uint8_t length;
/* In promiscuous mode, the entire frame is passed to the application inside
* the payload field. The offset field is used to specify the start of the
* actual payload, skipping the 802.15.4 header.
/* In promiscuous mode, the entire frame is passed to the application
* inside the payload field. The offset field is used to specify the start
* of the actual payload, skipping the 802.15.4 header.
*/
uint8_t offset;

View File

@ -37,7 +37,7 @@
#define __INCLUDE_NUTTX_WIRELESS_IEEE802154_MRF24J40_H
/****************************************************************************
* Included files
* Included Files
****************************************************************************/
#include <nuttx/config.h>
@ -52,7 +52,8 @@
* following structure provides an MCU-independent mechanism for controlling
* the MRF24J40 GPIO interrupt.
*
* The MRF24J40 interrupt is an active low, *level* interrupt. From Datasheet:
* The MRF24J40 interrupt is an active low, *level* interrupt.
* From Datasheet:
* "Note 1: The INTEDGE polarity defaults to:
*
* 0 = Falling Edge. Ensure that the interrupt polarity matches the
@ -85,8 +86,8 @@ extern "C"
* Name: mrf24j40_init
*
* Description:
* Initialize the IEEE802.15.4 driver. The MRF24J40 device is assumed to be
* in the post-reset state upon entry to this function.
* Initialize the IEEE802.15.4 driver. The MRF24J40 device is assumed to
* be in the post-reset state upon entry to this function.
*
* Input Parameters:
* spi - A reference to the platform's SPI driver for the MRF24J40

View File

@ -37,7 +37,7 @@
#define __INCLUDE_NUTTX_WIRELESS_IEEE802154_XBEE_H
/****************************************************************************
* Included files
* Included Files
****************************************************************************/
#include <nuttx/config.h>
@ -112,8 +112,8 @@ XBEEHANDLE xbee_init(FAR struct spi_dev_s *spi,
* Name: xbee_netdev_register
*
* Description:
* Register XBee network device. The network device is what binds the XBee MAC
* to the network layer (6LoWPAN, PF_IEEE802154).
* Register XBee network device. The network device is what binds the XBee
* MAC to the network layer (6LoWPAN, PF_IEEE802154).
*
* Input Parameters:
* xbee - A reference to the XBee Mac driver

View File

@ -1,4 +1,4 @@
/*******************************************************************************************
/****************************************************************************
* include/nuttx/wireless/nrf24l01.h
*
* Copyright (C) 2013 Laurent Latil
@ -31,14 +31,14 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
********************************************************************************************/
****************************************************************************/
#ifndef __INCLUDE_NUTTX_NRF24L01_H
#define __INCLUDE_NUTTX_NRF24L01_H
/********************************************************************************************
/****************************************************************************
* Included Files
********************************************************************************************/
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/spi/spi.h>
@ -48,9 +48,9 @@
#include <stdint.h>
#include <stdbool.h>
/********************************************************************************************
/****************************************************************************
* Pre-Processor Declarations
********************************************************************************************/
****************************************************************************/
#define NRF24L01_MIN_ADDR_LEN 3 /* Minimal length (in bytes) of a pipe address */
#define NRF24L01_MAX_ADDR_LEN 5 /* Maximum length (in bytes) of a pipe address */
@ -72,23 +72,27 @@
* COMMAND ARGUMENT
* NRF24L01IOC_SETRETRCFG Pointer to nrf24l01_retrcfg_t structure
* NRF24L01IOC_GETRETRCFG Pointer to nrf24l01_retrcfg_t structure
* NRF24L01IOC_SETPIPESCFG Pointer to an array of nrf24l01_pipecfg_t pointers
* NRF24L01IOC_GETPIPESCFG Pointer to an array of nrf24l01_pipecfg_t pointers
* NRF24L01IOC_SETPIPESENABLED Pointer to a uint8_t value, bit field of enabled /
* disabled pipes
* NRF24L01IOC_GETPIPESENABLED Pointer to a uint8_t value, bit field of enabled /
* disabled pipes
* NRF24L01IOC_SETPIPESCFG Pointer to an array of nrf24l01_pipecfg_t
* pointers
* NRF24L01IOC_GETPIPESCFG Pointer to an array of nrf24l01_pipecfg_t
* pointers
* NRF24L01IOC_SETPIPESENABLED Pointer to a uint8_t value, bit field of
* enabled / disabled pipes
* NRF24L01IOC_GETPIPESENABLED Pointer to a uint8_t value, bit field of
* enabled / disabled pipes
* NRF24L01IOC_SETDATARATE Pointer to a nrf24l01_datarate_t value
* NRF24L01IOC_GETDATARATE Pointer to a nrf24l01_datarate_t value
* NRF24L01IOC_SETADDRWIDTH Pointer to an uint32_t value, width of the address
* NRF24L01IOC_GETADDRWIDTH Pointer to an uint32_t value, width of the address
* NRF24L01IOC_SETADDRWIDTH Pointer to an uint32_t value, width of the
* address
* NRF24L01IOC_GETADDRWIDTH Pointer to an uint32_t value, width of the
* address
* NRF24L01IOC_SETSTATE Pointer to a nrf24l01_state_t value
* NRF24L01IOC_GETSTATE Pointer to a nrf24l01_state_t value
* NRF24L01IOC_GETLASTXMITCOUNT Pointer to an uint32_t value, retransmission count of the
* last send operation (NRF24L01_XMIT_MAXRT if no ACK
* received)
* NRF24L01IOC_GETLASTPIPENO Pointer to an uint32_t value, pipe # of the last received
* packet
* NRF24L01IOC_GETLASTXMITCOUNT Pointer to an uint32_t value, retransmission
* count of the last send operation
* (NRF24L01_XMIT_MAXRT if no ACK received)
* NRF24L01IOC_GETLASTPIPENO Pointer to an uint32_t value, pipe # of the
* last received packet
* NRF24L01IOC_SETTXPAYLOADNOACK Pointer to an uint32_t, interpreted as bool
* NRF24L01IOC_GETTXPAYLOADNOACK Pointer to an uint32_t, interpreted as bool
*/
@ -115,9 +119,9 @@
#define NRF24L01IOC_SETTXADDR WLIOC_SETADDR
#define NRF24L01IOC_GETTXADDR WLIOC_GETADDR
/********************************************************************************************
/****************************************************************************
* Public Data Types
********************************************************************************************/
****************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
@ -186,7 +190,9 @@ struct nrf24l01_pipecfg_s
};
typedef struct nrf24l01_pipecfg_s nrf24l01_pipecfg_t;
/* Configuration of the retransmission parameters (used when AA is enabled) */
/* Configuration of the retransmission parameters
* (used when AA is enabled)
*/
struct nrf24l01_retrcfg_s
{
@ -195,9 +201,9 @@ struct nrf24l01_retrcfg_s
};
typedef struct nrf24l01_retrcfg_s nrf24l01_retrcfg_t;
/* A reference to a structure of this type must be passed to the initialization
* method (nrf24l01_init() ). It provides some board-specific hooks used
* by driver to manage the GPIO lines (IRQ and CE).
/* A reference to a structure of this type must be passed to the
* initialization method (nrf24l01_init() ). It provides some board-specific
* hooks used by driver to manage the GPIO lines (IRQ and CE).
*
* Memory for this structure is provided by the caller. It is not copied
* by the driver and is presumed to persist while the driver is active.
@ -219,11 +225,11 @@ struct nrf24l01_config_s
void (*chipenable)(bool enable);
};
/********************************************************************************************
* Public Functions
********************************************************************************************/
/****************************************************************************
* Public Functions Definitions
****************************************************************************/
/********************************************************************************************
/****************************************************************************
* Register the nRF24L01+ device.
*
* Input Parameters:
@ -237,21 +243,22 @@ struct nrf24l01_config_s
* Possible errors:
* - ENOMEM: Out of kernel memory to allocate the device
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_register(FAR struct spi_dev_s *spi, FAR struct nrf24l01_config_s *cfg);
int nrf24l01_register(FAR struct spi_dev_s *spi,
FAR struct nrf24l01_config_s *cfg);
/********************************************************************************************
/****************************************************************************
* Initialize the nRF24L01+ chip to a default initial state.
*
* Input Parameters:
* dev Pointer to a registered nRF24L01 device structure
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_init(FAR struct nrf24l01_dev_s *dev);
/********************************************************************************************
/****************************************************************************
* Set the default TX address.
*
* Input Parameters:
@ -261,11 +268,12 @@ int nrf24l01_init(FAR struct nrf24l01_dev_s *dev);
* Returned Value:
* 0
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_settxaddr(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *addr);
int nrf24l01_settxaddr(FAR struct nrf24l01_dev_s *dev,
FAR const uint8_t *addr);
/********************************************************************************************
/****************************************************************************
* Get the default TX address.
*
* Input Parameters:
@ -275,11 +283,11 @@ int nrf24l01_settxaddr(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *addr);
* Returned Value:
* 0
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_gettxaddr(FAR struct nrf24l01_dev_s *dev, FAR uint8_t *addr);
/********************************************************************************************
/****************************************************************************
* Configure auto-retransmit
*
* Input Parameters:
@ -290,12 +298,13 @@ int nrf24l01_gettxaddr(FAR struct nrf24l01_dev_s *dev, FAR uint8_t *addr);
* Returned Value:
* 0
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_setretransmit(FAR struct nrf24l01_dev_s *dev,
nrf24l01_retransmit_delay_t retrdelay, uint8_t retrcount);
nrf24l01_retransmit_delay_t retrdelay,
uint8_t retrcount);
/********************************************************************************************
/****************************************************************************
* Configure a RX pipe.
*
* Input Parameters:
@ -306,12 +315,13 @@ int nrf24l01_setretransmit(FAR struct nrf24l01_dev_s *dev,
* Returned Value:
* 0
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_setpipeconfig(FAR struct nrf24l01_dev_s *dev, unsigned int pipeno,
int nrf24l01_setpipeconfig(FAR struct nrf24l01_dev_s *dev,
unsigned int pipeno,
FAR const nrf24l01_pipecfg_t *pipecfg);
/********************************************************************************************
/****************************************************************************
* Get pipe configuration.
*
* Input Parameters:
@ -322,12 +332,13 @@ int nrf24l01_setpipeconfig(FAR struct nrf24l01_dev_s *dev, unsigned int pipeno,
* Returned Value:
* 0
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_getpipeconfig(FAR struct nrf24l01_dev_s *dev, unsigned int pipeno,
int nrf24l01_getpipeconfig(FAR struct nrf24l01_dev_s *dev,
unsigned int pipeno,
FAR nrf24l01_pipecfg_t *pipecfg);
/********************************************************************************************
/****************************************************************************
* Enable a RX pipe.
*
* Input Parameters:
@ -338,12 +349,13 @@ int nrf24l01_getpipeconfig(FAR struct nrf24l01_dev_s *dev, unsigned int pipeno,
* Returned Value:
* 0
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_enablepipe(FAR struct nrf24l01_dev_s *dev, unsigned int pipeno,
int nrf24l01_enablepipe(FAR struct nrf24l01_dev_s *dev,
unsigned int pipeno,
bool enable);
/********************************************************************************************
/****************************************************************************
* Configure RF.
*
* Input Parameters:
@ -354,12 +366,13 @@ int nrf24l01_enablepipe(FAR struct nrf24l01_dev_s *dev, unsigned int pipeno,
* Returned Value:
* 0
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_setuprf(FAR struct nrf24l01_dev_s *dev, nrf24l01_datarate_t datarate,
int nrf24l01_setuprf(FAR struct nrf24l01_dev_s *dev,
nrf24l01_datarate_t datarate,
int outpower);
/********************************************************************************************
/****************************************************************************
* Configure the TX output power.
*
* Note that hardware supports only -18, -12, -6 and 0 dBm values.
@ -371,11 +384,11 @@ int nrf24l01_setuprf(FAR struct nrf24l01_dev_s *dev, nrf24l01_datarate_t datarat
* Returned Value:
* 0
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_settxpower(FAR struct nrf24l01_dev_s *dev, int outpower);
/********************************************************************************************
/****************************************************************************
* Get the current TX output power.
*
* Note that hardware supports only -18, -12, -6 and 0 dBm values.
@ -386,11 +399,11 @@ int nrf24l01_settxpower(FAR struct nrf24l01_dev_s *dev, int outpower);
* Returned Value:
* outpower Output power (in dBm)
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_gettxpower(FAR struct nrf24l01_dev_s *dev);
/********************************************************************************************
/****************************************************************************
* Set transmission data rate
*
* Input Parameters:
@ -399,12 +412,12 @@ int nrf24l01_gettxpower(FAR struct nrf24l01_dev_s *dev);
* Returned Value:
* datarate Data rate
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_setdatarate(FAR struct nrf24l01_dev_s *dev,
nrf24l01_datarate_t datarate);
/********************************************************************************************
/****************************************************************************
* Set radio frequency.
*
* Input Parameters:
@ -414,11 +427,11 @@ int nrf24l01_setdatarate(FAR struct nrf24l01_dev_s *dev,
* Returned Value:
* OK
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_setradiofreq(FAR struct nrf24l01_dev_s *dev, uint32_t freq);
/********************************************************************************************
/****************************************************************************
* Get current radio frequency.
*
* Input Parameters:
@ -427,11 +440,11 @@ int nrf24l01_setradiofreq(FAR struct nrf24l01_dev_s *dev, uint32_t freq);
* Returned Value:
* Radio frequency (in MHz)
*
********************************************************************************************/
****************************************************************************/
uint32_t nrf24l01_getradiofreq(FAR struct nrf24l01_dev_s *dev);
/********************************************************************************************
/****************************************************************************
* Configure address length.
*
* Input Parameters:
@ -441,22 +454,23 @@ uint32_t nrf24l01_getradiofreq(FAR struct nrf24l01_dev_s *dev);
* Returned Value:
* 0
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_setaddrwidth(FAR struct nrf24l01_dev_s *dev, uint32_t width);
/********************************************************************************************
/****************************************************************************
* Change the current lifecycle state of the nRF24L01+ chip.
*
* Input Parameters:
* dev Pointer to an nRF24L01 device structure
* state New state to put the nRF24L01 module into
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_changestate(FAR struct nrf24l01_dev_s *dev, nrf24l01_state_t state);
int nrf24l01_changestate(FAR struct nrf24l01_dev_s *dev,
nrf24l01_state_t state);
/********************************************************************************************
/****************************************************************************
* Send data to the default address.
*
* Input Parameters:
@ -466,12 +480,12 @@ int nrf24l01_changestate(FAR struct nrf24l01_dev_s *dev, nrf24l01_state_t state)
*
* Returned Value:
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_send(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *data,
size_t datalen);
/********************************************************************************************
/****************************************************************************
* Send data to the specified address.
*
* Input Parameters:
@ -482,12 +496,12 @@ int nrf24l01_send(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *data,
*
* Returned Value:
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_sendto(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *data,
size_t datalen, FAR const uint8_t *destaddr);
/********************************************************************************************
/****************************************************************************
* Get the retransmits count of the last transmission.
* This value is meaningful only if auto-acknowledge is enabled.
*
@ -495,28 +509,28 @@ int nrf24l01_sendto(FAR struct nrf24l01_dev_s *dev, FAR const uint8_t *data,
* dev Pointer to an nRF24L01 device structure
*
* Returned Value:
* Retransmit count, or NRF24L01_XMIT_MAXRT if no ACK received (transmission
* failure)
* Retransmit count, or NRF24L01_XMIT_MAXRT if no ACK received
* (transmission failure)
*
********************************************************************************************/
****************************************************************************/
int nrf24l01_xmitcount(FAR struct nrf24l01_dev_s *dev);
#ifdef CONFIG_WL_NRF24L01_RXSUPPORT
/********************************************************************************************
/****************************************************************************
* Read the next received frame.
*
* dev Pointer to an nRF24L01 device structure
* buffer Pointer on buffer used to store the received frame bytes
* buflen Length of the buffer (in bytes)
* recvpipe Pointer to a byte value used to store the pipe number of the frame
* (use NULL if the pipe number info is not required)
* recvpipe Pointer to a byte value used to store the pipe number of the
* frame (use NULL if the pipe number info is not required)
*
* Returned Value:
* Length of the actual data
*
********************************************************************************************/
****************************************************************************/
ssize_t nrf24l01_recv(struct nrf24l01_dev_s *dev, FAR uint8_t *buffer,
size_t buflen, FAR uint8_t *recvpipe);

View File

@ -206,8 +206,8 @@ void pktradio_metadata_initialize(void);
* None
*
* Returned Value:
* A reference to the allocated metadata structure. All user fields in this
* structure have been zeroed. On a failure to allocate, NULL is
* A reference to the allocated metadata structure. All user fields in
* this structure have been zeroed. On a failure to allocate, NULL is
* returned.
*
****************************************************************************/

View File

@ -159,8 +159,8 @@ struct nxflat_reloc_s
#define NXFLAT_RELOC_TYPE(r) ((uint32_t)(r) >> 30)
/* The bottom 28 bits of the relocation info is the (non-negative) offset into
* the D-Space that needs the fixup.
/* The bottom 28 bits of the relocation info is the (non-negative) offset
* into the D-Space that needs the fixup.
*/
#define NXFLAT_RELOC_OFFSET(r) ((uint32_t)(r) & 0x3fffffff)
@ -169,7 +169,8 @@ struct nxflat_reloc_s
*
* NXFLAT_RELOC_TYPE_REL32I Meaning: Object file contains a 32-bit offset
* into I-Space at the offset.
* Fixup: Add mapped I-Space address to the offset.
* Fixup: Add mapped I-Space address to the
* offset.
* NXFLAT_RELOC_TYPE_REL32D Meaning: Object file contains a 32-bit offset
* into D-Space at the offset.
* Fixup: Add allocated D-Space address to the

View File

@ -42,20 +42,20 @@
#include <nuttx/config.h>
/* If CONFIG_ARCH_STDBOOL_H is set, then the architecture will provide its own
* stdbool.h file. In this case, this header file will simply re-direct to
* the architecture-specfic stdbool.h header file.
/* If CONFIG_ARCH_STDBOOL_H is set, then the architecture will provide its
* own stdbool.h file. In this case, this header file will simply re-direct
* to the architecture-specfic stdbool.h header file.
*/
#ifdef CONFIG_ARCH_STDBOOL_H
# include <arch/stdbool.h>
/* NuttX will insist that the sizeof(bool) is 8-bits. The sizeof of _Bool
* used by any specific compiler is implementation specific: It can vary from
* used by any specific compiler is implementation specific: It can vary from
* compiler-to-compiler and even vary between different versions of the same
* compiler. Compilers seems to be converging to sizeof(_Bool) == 1. If that
* is true for your compiler, you should define CONFIG_C99_BOOL8 in your NuttX
* configuration for better standards compatibility.
* compiler. Compilers seems to be converging to sizeof(_Bool) == 1. If that
* is true for your compiler, you should define CONFIG_C99_BOOL8 in your
* NuttX configuration for better standards compatibility.
*
* CONFIG_C99_BOOL8 - Means (1) your C++ compiler has sizeof(_Bool) == 8,
* (2) your C compiler supports the C99 _Bool intrinsic type, and (3) that
@ -64,7 +64,7 @@
#else
/* nuttx/compiler.h may also define or undefine CONFIG_C99_BOOL8 */
/* nuttx/compiler.h may also define or undefine CONFIG_C99_BOOL8 */
# include <nuttx/compiler.h>
# include <stdint.h>

View File

@ -431,11 +431,12 @@ extern "C"
* calls. This, however, may not be practical in many cases and will lead
* to "correct" but awkward implementations.
*
* boardctl() is non-standard OS interface to alleviate the problem. It
* basically circumvents the normal device driver ioctl interlace and allows
* the application to perform direct IOCTL-like calls to the board-specific
* logic. It is especially useful for setting up board operational and
* test configurations.
* boardctl() is non-standard OS interface to alleviate the problem.
* It basically circumvents the normal device driver ioctl interlace and
* allows the application to perform direct IOCTL-like calls to the
* board-specific logic.
* It is especially useful for setting up board operational and test
* configurations.
*
* Input Parameters:
* cmd - Identifies the board command to be executed

View File

@ -47,6 +47,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
#ifndef CONFIG_LIB_SENDFILE_BUFSIZE

View File

@ -49,6 +49,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Definitions required by POSIX */
#define SHM_RDONLY 0x01 /* Attach read-only (else read-write) */

View File

@ -52,6 +52,7 @@
/****************************************************************************
* Public Types
****************************************************************************/
/* These are the values returned by uname:
*
* FIELD Default

View File

@ -39,6 +39,7 @@
/****************************************************************************
* Included Files
****************************************************************************/
/* This is just a wrapper around sys/syscall.h and arch/syscall.h */
#include <sys/syscall.h>
@ -53,7 +54,7 @@
****************************************************************************/
/****************************************************************************
* Public Functions
* Public Functions Definitions
****************************************************************************/
#ifdef __cplusplus