Add support for directly setting the GPIO values

This commit is contained in:
David M. Bryson 2017-05-03 19:42:02 -07:00
parent 307d33add0
commit aca7de3328
2 changed files with 5 additions and 0 deletions

View File

@ -1060,6 +1060,10 @@ uint16_t HamShield::getGpioMode(uint16_t gpio){
return radio_i2c_buf[0];
}
void HamShield::setGpios(uint16_t mode){
HSwriteWord(devAddr, A1846S_GPIO_MODE_REG, mode);
}
uint16_t HamShield::getGpios(){
HSreadWord(devAddr, A1846S_GPIO_MODE_REG, radio_i2c_buf);
return radio_i2c_buf[0];

View File

@ -440,6 +440,7 @@ class HamShield {
void setGpioLow(uint16_t gpio);
void setGpioHi(uint16_t gpio);
uint16_t getGpioMode(uint16_t gpio);
void setGpios(uint16_t mode);
uint16_t getGpios();
// Int