-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #366 from hftsai256/upstream-v21.11.3
Add a generic board for lpc11u35
- Loading branch information
Showing
7 changed files
with
171 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright (C) 2020 Yaotian Feng, Codetector<codetector@codetector.cn> | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#include "board.h" | ||
#include "quantum.h" | ||
|
||
__attribute__((weak)) void __chibios_override___early_init(void) { | ||
// Reset / Debug Select Input | ||
palSetLineMode(LINE_RESET , MODE_DIR_IN | MODE_MODE_PULL_UP | MODE_AD_DIGITAL); | ||
// ISP TP | ||
palSetLineMode(LINE_USBISP, MODE_DIR_IN | MODE_MODE_PULL_UP | MODE_AD_DIGITAL); | ||
// USB | ||
palSetLineMode(LINE_USBVBUS, MODE_FUNC_ALT1 | MODE_MODE_PULL_UP | MODE_AD_DIGITAL); | ||
palSetLineMode(LINE_USBCONN, MODE_FUNC_ALT1); | ||
} | ||
|
||
__attribute__((weak)) void __chibios_override_boardInit(void) {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
/* | ||
* This file has been automatically generated using ChibiStudio board | ||
* generator plugin. Do not edit manually. | ||
*/ | ||
|
||
#ifndef _BOARD_H_ | ||
#define _BOARD_H_ | ||
|
||
/*===========================================================================*/ | ||
/* Driver constants. */ | ||
/*===========================================================================*/ | ||
|
||
/* | ||
* Setup for LPC11U35 board. | ||
*/ | ||
|
||
/* | ||
* Board identifier. | ||
*/ | ||
#define BOARD_LPC11U35_GENERIC | ||
#define BOARD_NAME "LPC11U35_GENERIC" | ||
|
||
#define LPC11U35 | ||
|
||
/* | ||
* IO pins assignments. | ||
* | ||
* Define ST/SN GPIO convensions so that we could use A1..B31 shorthands as | ||
* defined in chibios: platforms/chibios/_pin_defs.h | ||
*/ | ||
#define GPIOA IOPORT0 | ||
#define GPIOB IOPORT1 | ||
|
||
|
||
#define LINE_RESET PAL_LINE(IOPORT0, 0) | ||
#define LINE_USBISP PAL_LINE(IOPORT0, 1) | ||
#define LINE_USBCONN PAL_LINE(IOPORT0, 6) | ||
#define LINE_USBVBUS PAL_LINE(IOPORT0, 3) | ||
|
||
#if !defined(_FROM_ASM_) | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
void boardInit(void); | ||
#ifdef __cplusplus | ||
} | ||
#endif | ||
#endif /* _FROM_ASM_ */ | ||
|
||
#endif /* _BOARD_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# List of all the board related files. | ||
BOARDSRC = $(CHIBIOS_CONTRIB)/os/hal/boards/LPC11U35_GENERIC/board.c | ||
|
||
# Required include directories | ||
BOARDINC = $(CHIBIOS_CONTRIB)/os/hal/boards/LPC11U35_GENERIC | ||
|
||
# Shared variables | ||
ALLCSRC += $(BOARDSRC) | ||
ALLINC += $(BOARDINC) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,4 +99,5 @@ void hal_lld_init(void) { | |
lpc_clock_init(); | ||
} | ||
|
||
|
||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters