[Refactor] Rename GPIO function, reduce radio pin drive strength

rocketry
Richard Eoin Meadows 2014-11-18 14:40:59 +00:00
rodzic 41717efce2
commit 92e7f3412d
1 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -146,9 +146,9 @@ static void si_trx_clear_pending_interrupts(uint8_t packet_handler_clear_pending
/** /**
* Sets the GPIO configuration for each pin * Sets the GPIO configuration for each pin
*/ */
static void si_trx_gpio_configuration(si_gpio_t gpio0, si_gpio_t gpio1, static void si_trx_set_gpio_configuration(si_gpio_t gpio0, si_gpio_t gpio1,
si_gpio_t gpio2, si_gpio_t gpio3, si_gpio_t gpio2, si_gpio_t gpio3,
uint8_t drive_strength) uint8_t drive_strength)
{ {
uint8_t buffer[8]; uint8_t buffer[8];
buffer[0] = SI_CMD_GPIO_PIN_CFG; buffer[0] = SI_CMD_GPIO_PIN_CFG;
@ -306,11 +306,11 @@ void si_trx_reset(void)
// TODO Lower drive dtrength // TODO Lower drive dtrength
/* Configure GPIOs */ /* Configure GPIOs */
si_trx_gpio_configuration(SI_GPIO_PIN_CFG_GPIO_MODE_INPUT, si_trx_set_gpio_configuration(SI_GPIO_PIN_CFG_GPIO_MODE_INPUT,
SI_GPIO_PIN_CFG_GPIO_MODE_INPUT | SI_GPIO_PIN_CFG_PULL_ENABLE, SI_GPIO_PIN_CFG_GPIO_MODE_INPUT | SI_GPIO_PIN_CFG_PULL_ENABLE,
SI_GPIO_PIN_CFG_GPIO_MODE_INPUT, SI_GPIO_PIN_CFG_GPIO_MODE_INPUT,
SI_GPIO_PIN_CFG_GPIO_MODE_INPUT | SI_GPIO_PIN_CFG_PULL_ENABLE, SI_GPIO_PIN_CFG_GPIO_MODE_INPUT | SI_GPIO_PIN_CFG_PULL_ENABLE,
SI_GPIO_PIN_CFG_DRV_STRENGTH_HIGH); SI_GPIO_PIN_CFG_DRV_STRENGTH_LOW);
si_trx_set_frequency(RADIO_FREQUENCY); si_trx_set_frequency(RADIO_FREQUENCY);
si_trx_set_tx_power(RADIO_POWER); si_trx_set_tx_power(RADIO_POWER);