Improved portab files.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10971 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2017-11-08 09:49:56 +00:00
parent ea6a0516fd
commit d375f4e9ac
9 changed files with 32 additions and 4 deletions

View File

@ -48,4 +48,8 @@
/* Module exported functions. */ /* Module exported functions. */
/*===========================================================================*/ /*===========================================================================*/
void portab_setup(void) {
}
/** @} */ /** @} */

View File

@ -65,7 +65,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void portab_setup(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -48,4 +48,8 @@
/* Module exported functions. */ /* Module exported functions. */
/*===========================================================================*/ /*===========================================================================*/
void portab_setup(void) {
}
/** @} */ /** @} */

View File

@ -58,7 +58,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void portab_setup(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -22,6 +22,7 @@
* @{ * @{
*/ */
#include "hal.h"
#include "portab.h" #include "portab.h"
/*===========================================================================*/ /*===========================================================================*/
@ -48,4 +49,14 @@
/* Module exported functions. */ /* Module exported functions. */
/*===========================================================================*/ /*===========================================================================*/
void portab_setup(void) {
/*
* ARD_D13 is programmed as output (board LED).
*/
palClearLine(LINE_ARD_D13);
palSetLineMode(LINE_ARD_D13, PAL_MODE_OUTPUT_PUSHPULL);
}
/** @} */ /** @} */

View File

@ -58,7 +58,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void portab_setup(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -48,4 +48,8 @@
/* Module exported functions. */ /* Module exported functions. */
/*===========================================================================*/ /*===========================================================================*/
void portab_setup(void) {
}
/** @} */ /** @} */

View File

@ -58,7 +58,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
void portab_setup(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -120,6 +120,11 @@ int main(void) {
halInit(); halInit();
chSysInit(); chSysInit();
/*
* Board-dependent initialization.
*/
portab_setup();
/* /*
* Initializes a serial-over-USB CDC driver. * Initializes a serial-over-USB CDC driver.
*/ */