Dawn Framework
1.0
Universal data acquisition framework for embedded systems
dawn
src
porting
nuttx
board.cxx
1
// dawn/src/porting/nuttx/board.cxx
2
//
3
// SPDX-License-Identifier: Apache-2.0
4
//
5
6
#include <nuttx/board.h>
7
#include <sys/boardctl.h>
8
9
#include "dawn/debug.hxx"
10
#include "netutils/netinit.h"
11
12
//***************************************************************************
13
// Public Functions
14
//***************************************************************************
15
16
//***************************************************************************
17
// Name: dawn_board_init
18
//***************************************************************************
19
20
int
dawn_board_init()
21
{
22
int
ret = OK;
23
24
#if defined(CONFIG_NET) && !defined(CONFIG_NSH_NETINIT)
25
/* Bring up the network */
26
27
netinit_bringup();
28
#endif
29
30
#ifdef CONFIG_BOARDCTL_FINALINIT
31
/* Perform architecture-specific final-initialization (if configured) */
32
33
ret = boardctl(BOARDIOC_FINALINIT, 0);
34
if
(ret < 0)
35
{
36
DAWNERR(
"ERROR: BOARDIOC_INIT %d\n"
, ret);
37
return
ret;
38
}
39
#endif
40
41
return
ret;
42
}
Generated by
1.9.8