RF antenna bias voltage control API.

This commit is contained in:
Jared Boone 2016-01-22 23:24:20 -08:00
parent 02b3e891f7
commit 10d4172d5c
6 changed files with 40 additions and 1 deletions

View file

@ -262,6 +262,18 @@ void RFFC507x::set_frequency(const rf::Frequency lo_frequency) {
flush();
}
void RFFC507x::set_gpo1(const bool new_value) {
if( new_value ) {
_map.r.gpo.p2gpo |= 1;
_map.r.gpo.p1gpo |= 1;
} else {
_map.r.gpo.p2gpo &= ~1;
_map.r.gpo.p1gpo &= ~1;
}
flush_one(Register::GPO);
}
spi::reg_t RFFC507x::readback(const Readback readback) {
/* TODO: This clobbers the rest of the DEV_CTRL register
* Time to implement bitfields for registers.