diff --git a/include/nuttx/addrenv.h b/include/nuttx/addrenv.h index fdedef20a2..ae8eaaf340 100644 --- a/include/nuttx/addrenv.h +++ b/include/nuttx/addrenv.h @@ -254,8 +254,9 @@ * mode. */ -typedef void (*addrenv_sigtramp_t)(_sa_sigaction_t sighand, int signo, - FAR siginfo_t *info, FAR void *ucontext); +typedef CODE void (*addrenv_sigtramp_t)(_sa_sigaction_t sighand, int signo, + FAR siginfo_t *info, + FAR void *ucontext); /* This structure describes the format of the .bss/.data reserved area */ diff --git a/include/nuttx/can/mcp2515.h b/include/nuttx/can/mcp2515.h index dde0ac67a1..50318cb3ed 100644 --- a/include/nuttx/can/mcp2515.h +++ b/include/nuttx/can/mcp2515.h @@ -63,8 +63,8 @@ /* Type of the MCP2515 interrupt handling callback */ struct mcp2515_config_s; /* Forward reference */ -typedef void (*mcp2515_handler_t)(FAR struct mcp2515_config_s *config, - FAR void *arg); +typedef CODE void (*mcp2515_handler_t)(FAR struct mcp2515_config_s *config, + FAR void *arg); /* A reference to a structure of this type must be passed to the MCP2515 * driver when the driver is instantiated. This structure provides diff --git a/include/nuttx/drivers/rwbuffer.h b/include/nuttx/drivers/rwbuffer.h index 28bd70677c..7d60db445c 100644 --- a/include/nuttx/drivers/rwbuffer.h +++ b/include/nuttx/drivers/rwbuffer.h @@ -62,10 +62,10 @@ * reload the read-ahead buffer, when appropriate. */ -typedef ssize_t (*rwbreload_t)(FAR void *dev, FAR uint8_t *buffer, - off_t startblock, size_t nblocks); -typedef ssize_t (*rwbflush_t)(FAR void *dev, FAR const uint8_t *buffer, - off_t startblock, size_t nblocks); +typedef CODE ssize_t (*rwbreload_t)(FAR void *dev, FAR uint8_t *buffer, + off_t startblock, size_t nblocks); +typedef CODE ssize_t (*rwbflush_t)(FAR void *dev, FAR const uint8_t *buffer, + off_t startblock, size_t nblocks); /* This structure holds the state of the buffers. In typical usage, * an instance of this structure is declared within each block driver diff --git a/include/nuttx/environ.h b/include/nuttx/environ.h index 1e4c1131b3..d368a97304 100644 --- a/include/nuttx/environ.h +++ b/include/nuttx/environ.h @@ -54,7 +54,7 @@ /* Callback function used with env_foreach() */ -typedef int (*env_foreach_t)(FAR void *arg, FAR const char *pair); +typedef CODE int (*env_foreach_t)(FAR void *arg, FAR const char *pair); /**************************************************************************** * Public Function Prototypes diff --git a/include/nuttx/input/stmpe811.h b/include/nuttx/input/stmpe811.h index c92dbe3f63..60b2fbb6ac 100644 --- a/include/nuttx/input/stmpe811.h +++ b/include/nuttx/input/stmpe811.h @@ -447,7 +447,7 @@ * handler but rather from the context of the worker thread with interrupts enabled. */ -typedef void (*stmpe811_handler_t)(int pin); +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 diff --git a/include/nuttx/ioexpander/ioexpander.h b/include/nuttx/ioexpander/ioexpander.h index 079b839ff6..f55aca9f25 100644 --- a/include/nuttx/ioexpander/ioexpander.h +++ b/include/nuttx/ioexpander/ioexpander.h @@ -312,8 +312,8 @@ typedef uint8_t ioe_pinset_t; /* This type represents a pin interrupt callback function */ struct ioexpander_dev_s; -typedef int (*ioe_callback_t)(FAR struct ioexpander_dev_s *dev, - ioe_pinset_t pinset, FAR void *arg); +typedef CODE int (*ioe_callback_t)(FAR struct ioexpander_dev_s *dev, + ioe_pinset_t pinset, FAR void *arg); #endif /* CONFIG_IOEXPANDER_INT_ENABLE */ /* I/O expander interface methods */ diff --git a/include/nuttx/net/netdev.h b/include/nuttx/net/netdev.h index c9ea734347..764d5b06b0 100644 --- a/include/nuttx/net/netdev.h +++ b/include/nuttx/net/netdev.h @@ -404,7 +404,7 @@ struct net_driver_s void *d_private; }; -typedef int (*devif_poll_callback_t)(FAR struct net_driver_s *dev); +typedef CODE int (*devif_poll_callback_t)(FAR struct net_driver_s *dev); /**************************************************************************** * Public Data diff --git a/include/nuttx/page.h b/include/nuttx/page.h index d6bfbcb8ca..e9b4e07f41 100644 --- a/include/nuttx/page.h +++ b/include/nuttx/page.h @@ -454,7 +454,7 @@ int up_allocpage(FAR struct tcb_s *tcb, FAR void **vpage); #ifdef CONFIG_PAGING_BLOCKINGFILL int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage); #else -typedef void (*up_pgcallback_t)(FAR struct tcb_s *tcb, int result); +typedef CODE void (*up_pgcallback_t)(FAR struct tcb_s *tcb, int result); int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage, up_pgcallback_t pg_callback); #endif diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index 69f25f3a39..52206686e5 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -224,6 +224,7 @@ enum tstate_e NUM_TASK_STATES /* Must be last */ }; + typedef enum tstate_e tstate_t; /* The following definitions are determined by tstate_t. Ordering of values @@ -250,6 +251,7 @@ union entry_u pthread_startroutine_t pthread; main_t main; }; + typedef union entry_u entry_t; /* This is the type of the function called at task startup */ @@ -785,7 +787,7 @@ struct pthread_tcb_s /* This is the callback type used by sched_foreach() */ -typedef void (*sched_foreach_t)(FAR struct tcb_s *tcb, FAR void *arg); +typedef CODE void (*sched_foreach_t)(FAR struct tcb_s *tcb, FAR void *arg); #endif /* __ASSEMBLY__ */ diff --git a/include/nuttx/sensors/adxl345.h b/include/nuttx/sensors/adxl345.h index a18b6ea51d..0e9c18f66f 100644 --- a/include/nuttx/sensors/adxl345.h +++ b/include/nuttx/sensors/adxl345.h @@ -279,7 +279,7 @@ * handler but rather from the context of the worker thread with interrupts enabled. */ -typedef void (*adxl345_handler_t)(FAR struct adxl345_config_s *config, FAR void *arg); +typedef CODE void (*adxl345_handler_t)(FAR struct adxl345_config_s *config, FAR void *arg); /* A reference to a structure of this type must be passed to the ADXL345 driver when the * driver is instantiated. This structure provides information about the configuration of the diff --git a/include/nuttx/sensors/xen1210.h b/include/nuttx/sensors/xen1210.h index de148da50e..ea2f356695 100644 --- a/include/nuttx/sensors/xen1210.h +++ b/include/nuttx/sensors/xen1210.h @@ -109,7 +109,7 @@ */ struct xen1210_config_s; -typedef void (*xen1210_handler_t)(FAR struct xen1210_config_s *config, FAR void *arg); +typedef CODE void (*xen1210_handler_t)(FAR struct xen1210_config_s *config, FAR void *arg); /* A reference to a structure of this type must be passed to the XEN1210 driver when the * driver is instantiated. This structure provides information about the configuration of diff --git a/include/nuttx/spi/spi.h b/include/nuttx/spi/spi.h index d5c28acb1f..254ed4badf 100644 --- a/include/nuttx/spi/spi.h +++ b/include/nuttx/spi/spi.h @@ -495,7 +495,7 @@ /* The type of the media change callback function */ -typedef void (*spi_mediachange_t)(FAR void *arg); +typedef CODE void (*spi_mediachange_t)(FAR void *arg); /* If the board supports multiple SPI devices types, this enumeration * identifies which is selected or de-selected. diff --git a/include/nuttx/spi/spi_bitbang.h b/include/nuttx/spi/spi_bitbang.h index 228fbd6a50..15b761c1d1 100644 --- a/include/nuttx/spi/spi_bitbang.h +++ b/include/nuttx/spi/spi_bitbang.h @@ -93,7 +93,7 @@ struct spi_bitbang_ops_s /* This is the type of the function that can exchange one bit */ -typedef uint8_t (*bitexchange_t)(uint8_t dataout, uint32_t holdtime); +typedef CODE uint8_t (*bitexchange_t)(uint8_t dataout, uint32_t holdtime); /* This structure provides the state of the SPI bit-bang driver */ diff --git a/include/nuttx/streams.h b/include/nuttx/streams.h index 6817828822..59c42665ce 100644 --- a/include/nuttx/streams.h +++ b/include/nuttx/streams.h @@ -51,11 +51,11 @@ /* These are the generic representations of a streams used by the NuttX */ struct lib_instream_s; -typedef int (*lib_getc_t)(FAR struct lib_instream_s *this); +typedef CODE int (*lib_getc_t)(FAR struct lib_instream_s *this); struct lib_outstream_s; -typedef void (*lib_putc_t)(FAR struct lib_outstream_s *this, int ch); -typedef int (*lib_flush_t)(FAR struct lib_outstream_s *this); +typedef CODE void (*lib_putc_t)(FAR struct lib_outstream_s *this, int ch); +typedef CODE int (*lib_flush_t)(FAR struct lib_outstream_s *this); struct lib_instream_s { @@ -75,15 +75,15 @@ struct lib_outstream_s /* Seek-able streams */ struct lib_sistream_s; -typedef int (*lib_sigetc_t)(FAR struct lib_sistream_s *this); -typedef off_t (*lib_siseek_t)(FAR struct lib_sistream_s *this, off_t offset, - int whence); +typedef CODE int (*lib_sigetc_t)(FAR struct lib_sistream_s *this); +typedef CODE off_t (*lib_siseek_t)(FAR struct lib_sistream_s *this, + off_t offset, int whence); struct lib_sostream_s; -typedef void (*lib_soputc_t)(FAR struct lib_sostream_s *this, int ch); -typedef int (*lib_soflush_t)(FAR struct lib_sostream_s *this); -typedef off_t (*lib_soseek_t)(FAR struct lib_sostream_s *this, off_t offset, - int whence); +typedef CODE void (*lib_soputc_t)(FAR struct lib_sostream_s *this, int ch); +typedef CODE int (*lib_soflush_t)(FAR struct lib_sostream_s *this); +typedef CODE off_t (*lib_soseek_t)(FAR struct lib_sostream_s *this, + off_t offset, int whence); struct lib_sistream_s { diff --git a/include/nuttx/timers/oneshot.h b/include/nuttx/timers/oneshot.h index 63e092fb3f..6b69a80162 100644 --- a/include/nuttx/timers/oneshot.h +++ b/include/nuttx/timers/oneshot.h @@ -187,8 +187,8 @@ */ struct oneshot_lowerhalf_s; -typedef void (*oneshot_callback_t)(FAR struct oneshot_lowerhalf_s *lower, - FAR void *arg); +typedef CODE void (*oneshot_callback_t)(FAR struct oneshot_lowerhalf_s *lower, + FAR void *arg); /* The one short operations supported by the lower half driver */ diff --git a/include/nuttx/usb/cdcacm.h b/include/nuttx/usb/cdcacm.h index 24109a98a0..1eab472ed9 100644 --- a/include/nuttx/usb/cdcacm.h +++ b/include/nuttx/usb/cdcacm.h @@ -323,7 +323,7 @@ enum cdcacm_event_e CDCACM_EVENT_SENDBREAK /* Send break request received */ }; -typedef FAR void (*cdcacm_callback_t)(enum cdcacm_event_e event); +typedef CODE void (*cdcacm_callback_t)(enum cdcacm_event_e event); /**************************************************************************** * Public Function Prototypes diff --git a/include/nuttx/usb/hid_parser.h b/include/nuttx/usb/hid_parser.h index 08fd4b053c..d9a77e0595 100644 --- a/include/nuttx/usb/hid_parser.h +++ b/include/nuttx/usb/hid_parser.h @@ -232,7 +232,7 @@ struct hid_rptinfo_s * structure, false if it should be ignored. */ -typedef bool (*hid_rptfilter_t)(FAR struct hid_rptitem_s *item); +typedef CODE bool (*hid_rptfilter_t)(FAR struct hid_rptitem_s *item); /**************************************************************************** * Public Function Prototypes diff --git a/include/nuttx/usb/usbdev_trace.h b/include/nuttx/usb/usbdev_trace.h index f743d82d4a..d98aa2c3f7 100644 --- a/include/nuttx/usb/usbdev_trace.h +++ b/include/nuttx/usb/usbdev_trace.h @@ -421,7 +421,7 @@ struct trace_msg_t /* Enumeration callback function signature */ -typedef int (*trace_callback_t)(struct usbtrace_s *trace, void *arg); +typedef CODE int (*trace_callback_t)(struct usbtrace_s *trace, void *arg); /* Bit mask input type for usbtrace_enable(). If TRACE_NIDS grows beyond * 16, then this will have to be changed to uint32_t @@ -431,7 +431,7 @@ typedef uint16_t usbtrace_idset_t; /* Print routine to use for usbdev_trprint() output */ -typedef int (*trprintf_t)(const char *fmt, ...); +typedef CODE int (*trprintf_t)(const char *fmt, ...); /**************************************************************************** * Public Data diff --git a/include/nuttx/usb/usbhost_trace.h b/include/nuttx/usb/usbhost_trace.h index ce8270dc99..61db2d16dc 100644 --- a/include/nuttx/usb/usbhost_trace.h +++ b/include/nuttx/usb/usbhost_trace.h @@ -85,7 +85,7 @@ /* Enumeration callback function signature */ -typedef int (*usbhost_trcallback_t)(FAR uint32_t trace, FAR void *arg); +typedef CODE int (*usbhost_trcallback_t)(FAR uint32_t trace, FAR void *arg); /**************************************************************************** * Public Data diff --git a/include/nuttx/wireless/bluetooth/bt_gatt.h b/include/nuttx/wireless/bluetooth/bt_gatt.h index c724051768..58f1fa4ffb 100644 --- a/include/nuttx/wireless/bluetooth/bt_gatt.h +++ b/include/nuttx/wireless/bluetooth/bt_gatt.h @@ -446,7 +446,8 @@ typedef CODE uint8_t struct bt_conn_s; /* Forward reference */ -typedef void (*bt_gatt_rsp_func_t)(FAR struct bt_conn_s *conn, uint8_t err); +typedef CODE void (*bt_gatt_rsp_func_t)(FAR struct bt_conn_s *conn, + uint8_t err); /* Read callback function * diff --git a/include/nuttx/wireless/cc1101.h b/include/nuttx/wireless/cc1101.h index 746b091c2d..0a91aa3991 100644 --- a/include/nuttx/wireless/cc1101.h +++ b/include/nuttx/wireless/cc1101.h @@ -262,7 +262,7 @@ extern "C" # define EXTERN extern #endif -typedef 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 diff --git a/include/nuttx/wqueue.h b/include/nuttx/wqueue.h index d2f1618f49..c3c18b679c 100644 --- a/include/nuttx/wqueue.h +++ b/include/nuttx/wqueue.h @@ -262,7 +262,7 @@ /* Defines the work callback */ -typedef void (*worker_t)(FAR void *arg); +typedef CODE void (*worker_t)(FAR void *arg); /* Defines one entry in the work queue. The user only needs this structure * in order to declare instances of the work structure. Handling of all diff --git a/include/pthread.h b/include/pthread.h index 679cdd0ede..9e1ed11347 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -231,7 +231,7 @@ typedef FAR void *pthread_addr_t; #define __PTHREAD_ADDR_T_DEFINED 1 #endif -typedef pthread_addr_t (*pthread_startroutine_t)(pthread_addr_t); +typedef CODE pthread_addr_t (*pthread_startroutine_t)(pthread_addr_t); typedef pthread_startroutine_t pthread_func_t; struct pthread_attr_s