diff --git a/.codespell-ignore-lines b/.codespell-ignore-lines index 4b6f55c666e..45628423d95 100644 --- a/.codespell-ignore-lines +++ b/.codespell-ignore-lines @@ -1,6 +1,8 @@ mynewt-nimble/nimble/host/services/ans/src/ble_svc_ans.c mynewt-nimble/nimble/host/services/ans/include +#include "services/ans/ble_svc_ans.h" #include "crypto/controlse/ccertificate.hxx" + * notifications for the ANS Unread Alert Status characteristic object = new Controlse::CCertificate( Controlse::CCertificate cert(se, settings->key_id); auto certificate = Controlse::CCertificate( diff --git a/boot/miniboot/miniboot_main.c b/boot/miniboot/miniboot_main.c index 63f47465c62..ce490c45bef 100644 --- a/boot/miniboot/miniboot_main.c +++ b/boot/miniboot/miniboot_main.c @@ -39,7 +39,7 @@ * Name: miniboot_main * * Description: - * Minimal bootlaoder entry point. + * Minimal bootloader entry point. * ****************************************************************************/ @@ -49,10 +49,6 @@ int main(int argc, FAR char *argv[]) syslog(LOG_INFO, "*** miniboot ***\n"); - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); - #ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ diff --git a/boot/nxboot/nxboot_main.c b/boot/nxboot/nxboot_main.c index ddc2f228422..9048b7a3081 100644 --- a/boot/nxboot/nxboot_main.c +++ b/boot/nxboot/nxboot_main.c @@ -264,16 +264,10 @@ int main(int argc, FAR char *argv[]) FAR struct boardioc_reset_cause_s cause; #endif -#if defined(CONFIG_BOARDCTL) && !defined(CONFIG_NSH_ARCHINIT) - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); - #ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -#endif #endif syslog(LOG_INFO, "*** nxboot ***\n"); diff --git a/examples/foc/foc_main.c b/examples/foc/foc_main.c index 4b280e848de..2f1b6b0c4f8 100644 --- a/examples/foc/foc_main.c +++ b/examples/foc/foc_main.c @@ -142,7 +142,7 @@ struct args_s g_args = } }; -/* Start allowed at defaule */ +/* Start allowed at default */ static bool g_start_allowed = true; static pthread_mutex_t g_start_allowed_lock = PTHREAD_MUTEX_INITIALIZER; @@ -294,16 +294,10 @@ int main(int argc, char *argv[]) goto errout_no_nxscope; } -#ifndef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); - -# ifdef CONFIG_BOARDCTL_FINALINIT +#ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -# endif #endif PRINTF("\nStart foc_main application!\n\n"); diff --git a/examples/lvgldemo/lvgldemo.c b/examples/lvgldemo/lvgldemo.c index 55d6620edce..b6ab1e5ab24 100644 --- a/examples/lvgldemo/lvgldemo.c +++ b/examples/lvgldemo/lvgldemo.c @@ -38,23 +38,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* Should we perform board-specific driver initialization? There are two - * ways that board initialization can occur: 1) automatically via - * board_late_initialize() during bootupif CONFIG_BOARD_LATE_INITIALIZE - * or 2). - * via a call to boardctl() if the interface is enabled - * (CONFIG_BOARDCTL=y). - * If this task is running as an NSH built-in application, then that - * initialization has probably already been performed otherwise we do it - * here. - */ - -#undef NEED_BOARDINIT - -#if defined(CONFIG_BOARDCTL) && !defined(CONFIG_NSH_ARCHINIT) -# define NEED_BOARDINIT 1 -#endif - /**************************************************************************** * Private Types ****************************************************************************/ @@ -122,13 +105,6 @@ int main(int argc, FAR char *argv[]) return -1; } -#ifdef NEED_BOARDINIT - /* Perform board-specific driver initialization */ - - boardctl(BOARDIOC_INIT, 0); - -#endif - lv_init(); lv_nuttx_dsc_init(&info); diff --git a/examples/lvglterm/lvglterm.c b/examples/lvglterm/lvglterm.c index 90269daa875..b5fefe38856 100644 --- a/examples/lvglterm/lvglterm.c +++ b/examples/lvglterm/lvglterm.c @@ -63,23 +63,6 @@ * Pre-processor Definitions ****************************************************************************/ -/* Should we perform board-specific driver initialization? There are two - * ways that board initialization can occur: 1) automatically via - * board_late_initialize() during bootupif CONFIG_BOARD_LATE_INITIALIZE - * or 2). - * via a call to boardctl() if the interface is enabled - * (CONFIG_BOARDCTL=y). - * If this task is running as an NSH built-in application, then that - * initialization has probably already been performed otherwise we do it - * here. - */ - -#undef NEED_BOARDINIT - -#if defined(CONFIG_BOARDCTL) && !defined(CONFIG_NSH_ARCHINIT) -# define NEED_BOARDINIT 1 -#endif - /* How often to poll for output from NSH Shell (milliseconds) */ #define TIMER_PERIOD_MS 100 @@ -550,16 +533,10 @@ int main(int argc, FAR char *argv[]) uv_loop_t ui_loop; #endif -#ifdef NEED_BOARDINIT - /* Perform board-specific driver initialization */ - - boardctl(BOARDIOC_INIT, 0); - #ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -#endif #endif /* LVGL initialization */ diff --git a/examples/nimble/nimble_main.c b/examples/nimble/nimble_main.c index ba46199f7fc..68eb2f051c2 100644 --- a/examples/nimble/nimble_main.c +++ b/examples/nimble/nimble_main.c @@ -255,12 +255,6 @@ int main(int argc, FAR char *argv[]) ble_hci_sock_set_device(atoi(argv[1])); } -#ifndef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization */ - - boardctl(BOARDIOC_INIT, 0); -#endif - #ifndef CONFIG_NSH_NETINIT /* Bring up the network */ diff --git a/examples/nimble_blecent/nimble_blecent_main.c b/examples/nimble_blecent/nimble_blecent_main.c index a20dd282db9..5af9d2b03a5 100644 --- a/examples/nimble_blecent/nimble_blecent_main.c +++ b/examples/nimble_blecent/nimble_blecent_main.c @@ -412,7 +412,7 @@ static int blecent_gap_event(FAR struct ble_gap_event *event, FAR void *arg) return 0; } - /* An advertisment report was received during GAP discovery. */ + /* An advertisement report was received during GAP discovery. */ print_adv_fields(&fields); @@ -632,12 +632,6 @@ int main(int argc, FAR char **argv) ble_hci_sock_set_device(atoi(argv[1])); } -#ifndef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization */ - - boardctl(BOARDIOC_INIT, 0); -#endif - #ifndef CONFIG_NSH_NETINIT /* Bring up the network */ diff --git a/examples/nimble_bleprph/nimble_bleprph_main.c b/examples/nimble_bleprph/nimble_bleprph_main.c index 9dea4d226e0..9c41f72b2e4 100644 --- a/examples/nimble_bleprph/nimble_bleprph_main.c +++ b/examples/nimble_bleprph/nimble_bleprph_main.c @@ -140,7 +140,7 @@ static void bleprph_advertise(void) BLE_HS_ADV_F_BREDR_UNSUP; /* Indicate that the TX power level field should be included; have the - * stack fill this value automatically. This is done by assiging the + * stack fill this value automatically. This is done by assigning the * special value BLE_HS_ADV_TX_PWR_LVL_AUTO. */ @@ -372,12 +372,6 @@ int main(int argc, FAR char *argv[]) ble_hci_sock_set_device(atoi(argv[1])); } -#ifndef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization */ - - boardctl(BOARDIOC_INIT, 0); -#endif - #ifndef CONFIG_NSH_NETINIT /* Bring up the network */ diff --git a/examples/nxscope/nxscope_main.c b/examples/nxscope/nxscope_main.c index b2311a74aae..0a28e707d72 100644 --- a/examples/nxscope/nxscope_main.c +++ b/examples/nxscope/nxscope_main.c @@ -435,16 +435,10 @@ int main(int argc, FAR char *argv[]) struct nxscope_dummy_cfg_s nxs_dummy_cfg; #endif -#ifndef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); - -# ifdef CONFIG_BOARDCTL_FINALINIT +#ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -# endif #endif #ifdef CONFIG_EXAMPLES_NXSCOPE_CDCACM diff --git a/examples/powerled/powerled_main.c b/examples/powerled/powerled_main.c index c0b3cd29d38..1098d635bc6 100644 --- a/examples/powerled/powerled_main.c +++ b/examples/powerled/powerled_main.c @@ -435,16 +435,10 @@ int main(int argc, char *argv[]) goto errout; } -#ifndef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); - #ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -#endif #endif /* Set LED current limit */ diff --git a/examples/smps/smps_main.c b/examples/smps/smps_main.c index ba6a7b079ae..4f0e306c976 100644 --- a/examples/smps/smps_main.c +++ b/examples/smps/smps_main.c @@ -476,16 +476,10 @@ int main(int argc, char *argv[]) goto errout; } -#ifndef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); - #ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -#endif #endif /* Set SMPS mode */ diff --git a/graphics/nxwm/src/nxwm_main.cxx b/graphics/nxwm/src/nxwm_main.cxx index 98feabbf6eb..6b6a3ca1ddc 100644 --- a/graphics/nxwm/src/nxwm_main.cxx +++ b/graphics/nxwm/src/nxwm_main.cxx @@ -485,16 +485,6 @@ static bool createMediaPlayer(void) int main(int argc, char *argv[]) { -#if defined(CONFIG_BOARDCTL) && !defined(CONFIG_BOARD_LATE_INITIALIZE) - // Should we perform board-specific initialization? There are two ways - // that board initialization can occur: 1) automatically via - // board_late_initialize() during bootup if CONFIG_BOARD_LATE_INITIALIZE, or - // 2) here via a call to boardctl() if the interface is enabled - // (CONFIG_BOARDCTL=y). - - boardctl(BOARDIOC_INIT, 0); -#endif - #ifdef CONFIG_NXWM_NXTERM // Initialize the NSH library diff --git a/graphics/twm4nx/Kconfig b/graphics/twm4nx/Kconfig index 3f9600f68af..3b114df884e 100644 --- a/graphics/twm4nx/Kconfig +++ b/graphics/twm4nx/Kconfig @@ -42,17 +42,6 @@ config TWM4NX_REVMINOR string "Twm4Nx minor version number" default "0" -config TWM4NX_ARCHINIT - bool "Have architecture-specific initialization" - default n - select BOARDCTL - depends on !NSH_ARCHINIT - ---help--- - Set if your board provides architecture specific initialization - via the board-interface function boardctl(). The boardctl() - function will be called early in Twm4Nx initialization to allow - board logic to do such things as configure MMC/SD slots. - config TWM4NX_NETINIT bool "Network initialization" default y diff --git a/graphics/twm4nx/src/twm4nx_main.cxx b/graphics/twm4nx/src/twm4nx_main.cxx index 30185ad07d2..3cfb3a6b5c7 100644 --- a/graphics/twm4nx/src/twm4nx_main.cxx +++ b/graphics/twm4nx/src/twm4nx_main.cxx @@ -98,23 +98,6 @@ int main(int argc, FAR char *argv[]) int ret; -#if defined(CONFIG_TWM4NX_ARCHINIT) && defined(CONFIG_BOARDCTL) && \ - !defined(CONFIG_BOARD_LATE_INITIALIZE) - // Should we perform board-specific initialization? There are two ways - // that board initialization can occur: 1) automatically via - // board_late_initialize() during bootup if CONFIG_BOARD_LATE_INITIALIZE, or - // 2) here via a call to boardctl() if the interface is enabled - // (CONFIG_BOARDCTL=y). board_early_initialize() is also possibility, - // although less likely. - - ret = boardctl(BOARDIOC_INIT, 0); - if (ret < 0) - { - twmerr("ERROR: boardctl(BOARDIOC_INIT) failed: %d\n", errno); - return EXIT_FAILURE; - } -#endif - #ifdef CONFIG_TWM4NX_NETINIT /* Bring up the network */ diff --git a/nshlib/Kconfig b/nshlib/Kconfig index b9a51038330..1fc34cb213e 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -9,7 +9,7 @@ config NSH_LIBRARY bool "NSH Library" default n select NETUTILS_NETLIB if NET - select BOARDCTL if (!NSH_DISABLE_MKRD && !DISABLE_MOUNTPOINT) || NSH_ARCHINIT + select BOARDCTL if (!NSH_DISABLE_MKRD && !DISABLE_MOUNTPOINT) select BOARDCTL_MKRD if !NSH_DISABLE_MKRD && !DISABLE_MOUNTPOINT ---help--- Build the NSH support library. This is used, for example, by @@ -1116,16 +1116,6 @@ config NSH_USBDEV_TRACEINTERRUPTS endif # NSH_USBDEV_TRACE endmenu # USB Device Trace Support -config NSH_ARCHINIT - bool "Have architecture-specific initialization" - default n - select BOARDCTL - ---help--- - Set if your board provides architecture specific initialization - via the board-interface function boardctl(). The boardctl() - function will be called early in NSH initialization to allow - board logic to do such things as configure MMC/SD slots. - menu "Networking Configuration" depends on NET diff --git a/nshlib/nsh.h b/nshlib/nsh.h index 8ea334d077e..2fb3cf867cc 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -807,13 +807,6 @@ int nsh_loginscript(FAR struct nsh_vtbl_s *vtbl); * available: */ -/* Architecture-specific initialization depends on boardctl(BOARDIOC_INIT) */ - -#if defined(CONFIG_NSH_ARCHINIT) && !defined(CONFIG_BOARDCTL) -# warning CONFIG_NSH_ARCHINIT is set, but CONFIG_BOARDCTL is not -# undef CONFIG_NSH_ARCHINIT -#endif - /* The mkrd command depends on boardctl(BOARDIOC_MKRD) */ #if !defined(CONFIG_BOARDCTL) || !defined(CONFIG_BOARDCTL_MKRD) diff --git a/nshlib/nsh_init.c b/nshlib/nsh_init.c index 4846ff15b97..aea095e34cd 100644 --- a/nshlib/nsh_init.c +++ b/nshlib/nsh_init.c @@ -143,12 +143,6 @@ void nsh_initialize(void) boardctl(BOARDIOC_APP_SYMTAB, (uintptr_t)&symdesc); #endif -#ifdef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); -#endif - #if defined(CONFIG_ETC_ROMFS) && !defined(CONFIG_NSH_DISABLESCRIPT) pstate = nsh_newconsole(false); @@ -163,12 +157,6 @@ void nsh_initialize(void) netinit_bringup(); #endif -#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT) - /* Perform architecture-specific final-initialization (if configured) */ - - boardctl(BOARDIOC_FINALINIT, 0); -#endif - #if defined(CONFIG_ETC_ROMFS) && !defined(CONFIG_NSH_DISABLESCRIPT) /* Execute the start-up script */ diff --git a/system/adb/Kconfig b/system/adb/Kconfig index 05296cca76b..a97ac5a9f85 100644 --- a/system/adb/Kconfig +++ b/system/adb/Kconfig @@ -200,19 +200,12 @@ config ADBD_SOCKET_SERVICE ---help--- Enable "adb forward|reverse" feature. -config ADBD_BOARD_INIT - bool "Board initialization" - depends on BOARDCTL - default n - ---help--- - Setup board before running adb daemon. - config ADBD_USB_BOARDCTL bool "USB Board Control" depends on BOARDCTL depends on ADBD_USB_SERVER select BOARDCTL_USBDEVCTRL - default ADBD_BOARD_INIT + default y ---help--- Connect usbdev before running adb daemon. diff --git a/system/adb/adb_main.c b/system/adb/adb_main.c index 3895001d50b..8703337c689 100644 --- a/system/adb/adb_main.c +++ b/system/adb/adb_main.c @@ -32,8 +32,7 @@ #include #include -#if defined(CONFIG_ADBD_BOARD_INIT) || defined (CONFIG_BOARDCTL_RESET) || \ - defined(CONFIG_ADBD_USB_BOARDCTL) +#if defined (CONFIG_BOARDCTL_RESET) || defined(CONFIG_ADBD_USB_BOARDCTL) # include #endif @@ -120,10 +119,6 @@ int main(int argc, FAR char **argv) int ret; #endif -#ifdef CONFIG_ADBD_BOARD_INIT - boardctl(BOARDIOC_INIT, 0); -#endif /* CONFIG_ADBD_BOARD_INIT */ - #ifdef CONFIG_ADBD_USB_BOARDCTL /* Setup USBADB device */ diff --git a/system/adcscope/adcscope_main.c b/system/adcscope/adcscope_main.c index 3413c6b52b9..991a756ca5e 100644 --- a/system/adcscope/adcscope_main.c +++ b/system/adcscope/adcscope_main.c @@ -382,16 +382,10 @@ int main(int argc, FAR char *argv[]) pthread_t thread; int ret; -#ifndef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); - -# ifdef CONFIG_BOARDCTL_FINALINIT +#ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -# endif #endif #ifdef CONFIG_SYSTEM_ADCSCOPE_CDCACM diff --git a/system/ofloader/ofloader.c b/system/ofloader/ofloader.c index 8200262febf..6648a66b03f 100644 --- a/system/ofloader/ofloader.c +++ b/system/ofloader/ofloader.c @@ -35,7 +35,7 @@ #include "ofloader.h" /**************************************************************************** - * Private Typess + * Private Types ****************************************************************************/ struct devinfo_s @@ -320,16 +320,10 @@ int main(int argc, FAR char *argv[]) size_t i; mqd_t mq; -#if defined(CONFIG_BOARDCTL) && !defined(CONFIG_NSH_ARCHINIT) - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); - -# ifdef CONFIG_BOARDCTL_FINALINIT +#ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -# endif #endif memset(&mqattr, 0, sizeof(struct mq_attr)); diff --git a/system/sensorscope/sensorscope_main.c b/system/sensorscope/sensorscope_main.c index 2248afaecb3..f93dc5bf1bf 100644 --- a/system/sensorscope/sensorscope_main.c +++ b/system/sensorscope/sensorscope_main.c @@ -58,7 +58,7 @@ struct nxsensor_info_s FAR const char *name; size_t data_size; /* Sensor read data size */ size_t data_offset; /* Read data offset (no timestamp) */ - size_t dim; /* Data vector dimenstion */ + size_t dim; /* Data vector dimension */ int dtype; /* Data vector type */ }; @@ -313,7 +313,7 @@ static int nxscope_channels(FAR struct nxscope_thr_env_s *envp) list_initialize(&envp->objlist); - /* Open sensors direcotry */ + /* Open sensors directory */ dir = opendir(SENSOR_PATH); if (!dir) @@ -411,16 +411,10 @@ int main(int argc, FAR char *argv[]) pthread_t thread; int ret; -#ifndef CONFIG_NSH_ARCHINIT - /* Perform architecture-specific initialization (if configured) */ - - boardctl(BOARDIOC_INIT, 0); - -# ifdef CONFIG_BOARDCTL_FINALINIT +#ifdef CONFIG_BOARDCTL_FINALINIT /* Perform architecture-specific final-initialization (if configured) */ boardctl(BOARDIOC_FINALINIT, 0); -# endif #endif #ifdef CONFIG_SYSTEM_SENSORSCOPE_CDCACM