diff options
author | Christian Pointner <equinox@mur.at> | 2015-02-17 14:21:58 +0100 |
---|---|---|
committer | Christian Pointner <equinox@mur.at> | 2015-02-17 14:21:58 +0100 |
commit | a40b7dcbd420f8c02ec3e6be341001c57a9610d7 (patch) | |
tree | b4af9a5d5f3f4fd0d8efa04ae518c9439fc08a21 /software/avr.lib/cc1101.c | |
parent | hhd70: getting/setting frequency (diff) |
hhd70: added idle command
Diffstat (limited to 'software/avr.lib/cc1101.c')
-rw-r--r-- | software/avr.lib/cc1101.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/software/avr.lib/cc1101.c b/software/avr.lib/cc1101.c index 9053417..833adff 100644 --- a/software/avr.lib/cc1101.c +++ b/software/avr.lib/cc1101.c @@ -99,6 +99,7 @@ static void cc1101_spi_write_register(uint8_t addr, uint8_t data) void cc1101_init(cc1101_driver_conf_t conf) { drv = conf; + cc1101_soft_reset(); } void cc1101_reg_init(void) @@ -111,11 +112,17 @@ void cc1101_soft_reset(void) cc1101_spi_strobe_command(CC1101_CMD_SRES); } + void cc1101_powerdown(void) { cc1101_spi_strobe_command(CC1101_CMD_SPWD); } +void cc1101_idle(void) +{ + cc1101_spi_strobe_command(CC1101_CMD_SIDLE); +} + void cc1101_set_freq_hz(uint32_t hz) { uint32_t freq = (uint32_t)((float)hz / drv.freq_corr); |