diff options
Diffstat (limited to 'software/hhd70dongle/hhd70.c')
-rw-r--r-- | software/hhd70dongle/hhd70.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/software/hhd70dongle/hhd70.c b/software/hhd70dongle/hhd70.c index 0abe61d..e8c973b 100644 --- a/software/hhd70dongle/hhd70.c +++ b/software/hhd70dongle/hhd70.c @@ -44,6 +44,26 @@ void hhd70_init(void) // SPSR = (1<<SPI2X); (4MHz vs. 8MHz) } +void hhd70_config_GDO0_OOK_output(bool output_mode) +{ + hhd70_set_OOK_GDO0_low(); + if (output_mode) + SPI_DDR |= (1 << GDO0); + else + SPI_DDR &= ~(1 << GDO0); +} + +void hhd70_set_OOK_GDO0_high(void) +{ + SPI_PORT |= (1 << GDO0); +} + +void hhd70_set_OOK_GDO0_low(void) +{ + //pull low + SPI_PORT &= ~(1<<GDO0); +} + void hhd70_spi_cs_enable(void) { //pull low |