diff options
author | px4dev <px4@purgatory.org> | 2013-07-04 23:16:13 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-07-04 23:16:13 -0700 |
commit | c21237667bc2802f675c74641d25f538db5f2c0c (patch) | |
tree | 0ce875a7fc6361fcb298e19e4f6a582ae168ba7c /src/modules/px4iofirmware | |
parent | f7963a8c84792ff6d95fa52d92f308c596e309e4 (diff) | |
download | px4-firmware-c21237667bc2802f675c74641d25f538db5f2c0c.tar.gz px4-firmware-c21237667bc2802f675c74641d25f538db5f2c0c.tar.bz2 px4-firmware-c21237667bc2802f675c74641d25f538db5f2c0c.zip |
iov2 pin definition cleanup sweep
Diffstat (limited to 'src/modules/px4iofirmware')
-rw-r--r-- | src/modules/px4iofirmware/controls.c | 4 | ||||
-rw-r--r-- | src/modules/px4iofirmware/px4io.c | 2 | ||||
-rw-r--r-- | src/modules/px4iofirmware/px4io.h | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/modules/px4iofirmware/controls.c b/src/modules/px4iofirmware/controls.c index 3cf9ca149..95103964e 100644 --- a/src/modules/px4iofirmware/controls.c +++ b/src/modules/px4iofirmware/controls.c @@ -59,10 +59,10 @@ static perf_counter_t c_gather_ppm; void controls_init(void) { - /* DSM input */ + /* DSM input (USART1) */ dsm_init("/dev/ttyS0"); - /* S.bus input */ + /* S.bus input (USART3) */ sbus_init("/dev/ttyS2"); /* default to a 1:1 input map, all enabled */ diff --git a/src/modules/px4iofirmware/px4io.c b/src/modules/px4iofirmware/px4io.c index 385920d53..e70b3fe88 100644 --- a/src/modules/px4iofirmware/px4io.c +++ b/src/modules/px4iofirmware/px4io.c @@ -143,7 +143,9 @@ user_start(int argc, char *argv[]) LED_SAFETY(false); /* turn on servo power (if supported) */ +#ifdef POWER_SERVO POWER_SERVO(true); +#endif /* start the safety switch handler */ safety_init(); diff --git a/src/modules/px4iofirmware/px4io.h b/src/modules/px4iofirmware/px4io.h index 47bcb8ddf..4965d0724 100644 --- a/src/modules/px4iofirmware/px4io.h +++ b/src/modules/px4iofirmware/px4io.h @@ -128,7 +128,9 @@ extern struct sys_state_s system_state; #define LED_AMBER(_s) stm32_gpiowrite(GPIO_LED2, !(_s)) #define LED_SAFETY(_s) stm32_gpiowrite(GPIO_LED3, !(_s)) -#define POWER_SERVO(_s) stm32_gpiowrite(GPIO_SERVO_PWR_EN, (_s)) +#ifdef GPIO_SERVO_PWR_EN +# define POWER_SERVO(_s) stm32_gpiowrite(GPIO_SERVO_PWR_EN, (_s)) +#endif #ifdef GPIO_ACC1_PWR_EN # define POWER_ACC1(_s) stm32_gpiowrite(GPIO_ACC1_PWR_EN, (_s)) #endif |