diff --git a/boards/arm/s32k1xx/s32k118evb/README.txt b/boards/arm/s32k1xx/s32k118evb/README.txt index 32b1b2aae00..1e9c468a160 100644 --- a/boards/arm/s32k1xx/s32k118evb/README.txt +++ b/boards/arm/s32k1xx/s32k118evb/README.txt @@ -29,6 +29,10 @@ Status changes, Fabio Balzano has verified that the NSH is functional on that board. + TODO: Need calibrate the delay loop. The current value of + CONFIG_BOARD_LOOPSPERMSEC is a bogus value retained from a copy-paste + (see apps/examples/calib_udelay). + Serial Console ============== diff --git a/boards/arm/s32k1xx/s32k146evb/README.txt b/boards/arm/s32k1xx/s32k146evb/README.txt index 697daab288d..e3a43c63b64 100644 --- a/boards/arm/s32k1xx/s32k146evb/README.txt +++ b/boards/arm/s32k1xx/s32k146evb/README.txt @@ -35,6 +35,10 @@ Status on the S32K118, I believe that the NSH configuration should now run out of FLASH. Unfortunately, I cannot demonstrate that. + TODO: Need calibrate the delay loop. The current value of + CONFIG_BOARD_LOOPSPERMSEC is a bogus value retained from a copy-paste + (see apps/examples/calib_udelay). + Serial Console ============== diff --git a/boards/arm/s32k1xx/s32k148evb/README.txt b/boards/arm/s32k1xx/s32k148evb/README.txt index e15fa51532f..685861140e8 100644 --- a/boards/arm/s32k1xx/s32k148evb/README.txt +++ b/boards/arm/s32k1xx/s32k148evb/README.txt @@ -15,7 +15,12 @@ Contents Status ====== - 2019-08-20: Configuration created but entirely untested. + 2019-08-20: NSH configuration created but entirely untested. + 2019-08-24: NSH configuratin verified running from FLASH. + + TODO: Need calibrate the delay loop. The current value of + CONFIG_BOARD_LOOPSPERMSEC is a bogus value retained from a copy-paste + (see apps/examples/calib_udelay). Serial Console ============== diff --git a/net/netdev/netdev.h b/net/netdev/netdev.h index b1cf2572952..b1e3355a36b 100644 --- a/net/netdev/netdev.h +++ b/net/netdev/netdev.h @@ -159,16 +159,27 @@ FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname); * Name: netdev_foreach * * Description: - * Enumerate each registered network device. + * Enumerate each registered network device. This function will terminate + * when either (1) all devices have been enumerated or (2) when a callback + * returns any non-zero value. * - * NOTE: netdev semaphore held throughout enumeration. + * NOTE 1: The network must be locked throughout the enumeration. + * NOTE 2: No checks are made on devices. For examples, callbacks will + * will be made on network devices that are in the 'down' state. + * The callback implementations must take into account all + * network device state. Typically, a network in the down state + * would not terminate the traversal. * * Input Parameters: * callback - Will be called for each registered device - * arg - User argument passed to callback() + * arg - Opaque user argument passed to callback() * * Returned Value: - * 0:Enumeration completed 1:Enumeration terminated early by callback + * 0: Enumeration completed + * 1: Enumeration terminated early by callback + * + * Assumptions: + * The network is locked. * ****************************************************************************/ diff --git a/net/netdev/netdev_foreach.c b/net/netdev/netdev_foreach.c index 2309645328d..958e268e6e7 100644 --- a/net/netdev/netdev_foreach.c +++ b/net/netdev/netdev_foreach.c @@ -53,16 +53,24 @@ * Name: netdev_foreach * * Description: - * Enumerate each registered network device. + * Enumerate each registered network device. This function will terminate + * when either (1) all devices have been enumerated or (2) when a callback + * returns any non-zero value. * - * NOTE: netdev semaphore held throughout enumeration. + * NOTE 1: The network must be locked throughout the enumeration. + * NOTE 2: No checks are made on devices. For examples, callbacks will + * will be made on network devices that are in the 'down' state. + * The callback implementations must take into account all + * network device state. Typically, a network in the down state + * would not terminate the traversal. * * Input Parameters: * callback - Will be called for each registered device - * arg - User argument passed to callback() + * arg - Opaque user argument passed to callback() * * Returned Value: - * 0:Enumeration completed 1:Enumeration terminated early by callback + * 0: Enumeration completed + * 1: Enumeration terminated early by callback * * Assumptions: * The network is locked.