diff options
author | Christian Pointner <equinox@mur.at> | 2015-02-18 01:48:39 +0100 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2015-02-18 01:48:39 +0100 |
commit | e8191d71ade086dc3f5d119a3c03098f620373a7 (patch) | |
tree | e96e428e10ff07622fc7985b5b91da175e212185 /software/avr.lib/cc1101.c | |
parent | comm: added disable port for LDO (diff) |
hhd70: added rssi and RX TX commands
Diffstat (limited to 'software/avr.lib/cc1101.c')
-rw-r--r-- | software/avr.lib/cc1101.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/software/avr.lib/cc1101.c b/software/avr.lib/cc1101.c index 3436782..1c00e83 100644 --- a/software/avr.lib/cc1101.c +++ b/software/avr.lib/cc1101.c @@ -138,6 +138,16 @@ void cc1101_fasttxon(void) cc1101_spi_strobe_command(CC1101_CMD_SFSTXON); } +void cc1101_rx(void) +{ + cc1101_spi_strobe_command(CC1101_CMD_SRX); +} + +void cc1101_tx(void) +{ + cc1101_spi_strobe_command(CC1101_CMD_STX); +} + char* cc1101_state_to_string(cc1101_state_t state) { switch(state) { @@ -217,6 +227,11 @@ uint32_t cc1101_get_freq_hz(void) return (uint32_t)((float)freq * drv.freq_corr); } +int8_t cc1101_get_rssi(void) +{ + return (int8_t)cc1101_spi_read_register(CC1101_REG_RO_RSSI); +} + static char* cc1101_config_reg_to_string(uint8_t addr) { switch(addr) { |