mirror of
https://github.com/apache/nuttx.git
synced 2026-10-13 01:00:12 +00:00
boards/arm/nrf52/nrf52840-dk: add procfs support
This commit is contained in:
parent
3eec9fcb9b
commit
ff25063c62
2 changed files with 25 additions and 0 deletions
|
|
@ -34,6 +34,18 @@
|
|||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* procfs File System */
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
# ifdef CONFIG_NSH_PROC_MOUNTPOINT
|
||||
# define NRF52_PROCFS_MOUNTPOINT CONFIG_NSH_PROC_MOUNTPOINT
|
||||
# else
|
||||
# define NRF52_PROCFS_MOUNTPOINT "/proc"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* LED definitions **********************************************************/
|
||||
|
||||
/* Definitions to configure LED GPIO as outputs */
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
#include <sys/types.h>
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/fs/fs.h>
|
||||
|
||||
#ifdef CONFIG_USERLED
|
||||
# include <nuttx/leds/userled.h>
|
||||
#endif
|
||||
|
|
@ -113,6 +115,17 @@ int nrf52_bringup(void)
|
|||
{
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_FS_PROCFS
|
||||
/* Mount the procfs file system */
|
||||
|
||||
ret = nx_mount(NULL, NRF52_PROCFS_MOUNTPOINT, "procfs", 0, NULL);
|
||||
if (ret < 0)
|
||||
{
|
||||
syslog(LOG_ERR,
|
||||
"ERROR: Failed to mount the PROC filesystem: %d\n", ret);
|
||||
}
|
||||
#endif /* CONFIG_FS_PROCFS */
|
||||
|
||||
#ifdef CONFIG_USERLED
|
||||
/* Register the LED driver */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue