Skip to content

Commit d94d2aa

Browse files
ldubexiaoxiang781216
authored andcommitted
tm4c1294-launchpad: Add reboot support.
1 parent 037dcbf commit d94d2aa

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

boards/arm/tiva/tm4c1294-launchpad/src/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,8 @@ CSRCS += tm4c_hciuart.c
5454
endif
5555
endif
5656

57+
ifeq ($(CONFIG_BOARDCTL_RESET),y)
58+
CSRCS += tm4c_reset.c
59+
endif
60+
5761
include $(TOPDIR)/boards/Board.mk
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/****************************************************************************
2+
* boards/arm/tiva/tm4c1294-launchpad/src/tm4c_reset.c
3+
*
4+
* Licensed to the Apache Software Foundation (ASF) under one or more
5+
* contributor license agreements. See the NOTICE file distributed with
6+
* this work for additional information regarding copyright ownership. The
7+
* ASF licenses this file to you under the Apache License, Version 2.0 (the
8+
* "License"); you may not use this file except in compliance with the
9+
* License. You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16+
* License for the specific language governing permissions and limitations
17+
* under the License.
18+
*
19+
****************************************************************************/
20+
21+
/****************************************************************************
22+
* Included Files
23+
****************************************************************************/
24+
25+
#include <nuttx/config.h>
26+
27+
#include <nuttx/arch.h>
28+
#include <nuttx/board.h>
29+
30+
#ifdef CONFIG_BOARDCTL_RESET
31+
32+
/****************************************************************************
33+
* Public Functions
34+
****************************************************************************/
35+
36+
/****************************************************************************
37+
* Name: board_reset
38+
*
39+
* Description:
40+
* Reset board. Support for this function is required by board-level
41+
* logic if CONFIG_BOARDCTL_RESET is selected.
42+
*
43+
* Input Parameters:
44+
* status - Status information provided with the reset event. This
45+
* meaning of this status information is board-specific. If not
46+
* used by a board, the value zero may be provided in calls to
47+
* board_reset().
48+
*
49+
* Returned Value:
50+
* If this function returns, then it was not possible to power-off the
51+
* board due to some constraints. The return value int this case is a
52+
* board-specific reason for the failure to shutdown.
53+
*
54+
****************************************************************************/
55+
56+
int board_reset(int status)
57+
{
58+
up_systemreset();
59+
return 0;
60+
}
61+
62+
#endif /* CONFIG_BOARDCTL_RESET */

0 commit comments

Comments
 (0)