Init servo pins in HAL_init (#14425)

This commit is contained in:
Scott Lahteine
2019-06-27 16:29:17 -05:00
committed by GitHub
parent 8ce84fa44f
commit 6664b90bbb
14 changed files with 49 additions and 14 deletions

View File

@ -27,9 +27,8 @@
*/
#define CPU_32_BIT
#define HAL_INIT
void HAL_init();
void HAL_init(void);
#include <stdint.h>
#include <stdarg.h>

View File

@ -48,9 +48,9 @@ void SysTick_Callback() {
disk_timerproc();
}
void HAL_init() {
void HAL_init(void) {
// Support the 4 LEDs some LPC176x boards have
// Init LEDs
#if PIN_EXISTS(LED)
SET_DIR_OUTPUT(LED_PIN);
WRITE_PIN_CLR(LED_PIN);
@ -74,6 +74,20 @@ void HAL_init() {
}
#endif
// Init Servo Pins
#if PIN_EXISTS(SERVO0)
OUT_WRITE(SERVO0_PIN, LOW);
#endif
#if PIN_EXISTS(SERVO1)
OUT_WRITE(SERVO1_PIN, LOW);
#endif
#if PIN_EXISTS(SERVO2)
OUT_WRITE(SERVO2_PIN, LOW);
#endif
#if PIN_EXISTS(SERVO3)
OUT_WRITE(SERVO3_PIN, LOW);
#endif
//debug_frmwrk_init();
//_DBG("\n\nDebug running\n");
// Initialise the SD card chip select pins as soon as possible