summaryrefslogtreecommitdiff
path: root/software/avr.lib/cc1101.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2015-02-17 04:39:55 +0100
committerChristian Pointner <equinox@mur.at>2015-02-17 04:39:55 +0100
commit03aa57dfe7179b7b592b23861c7ab7246d4da2f7 (patch)
tree711b122b348e2b8e8b6821a5cd38306916c83e2b /software/avr.lib/cc1101.h
parenthhd70: started hhd70dongle form scratch (diff)
strobing command and register read and write work
Diffstat (limited to 'software/avr.lib/cc1101.h')
-rw-r--r--software/avr.lib/cc1101.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/software/avr.lib/cc1101.h b/software/avr.lib/cc1101.h
index 1519a3d..c5690e0 100644
--- a/software/avr.lib/cc1101.h
+++ b/software/avr.lib/cc1101.h
@@ -23,7 +23,19 @@
#ifndef SPREADAVR_cc1101_h_INCLUDED
#define SPREADAVR_cc1101_h_INCLUDED
-void cc1101_init(void);
+#define CC1101_FREQ_CORR(xtal) ((float)(xtal/65536.0))
+
+typedef struct {
+ void (*spi_cs_enable)(void);
+ void (*spi_cs_disable)(void);
+ uint8_t (*spi_read_miso)(void);
+ void (*spi_write_byte)(const uint8_t);
+ uint8_t (*spi_read_byte)(void);
+ uint8_t (*spi_transfer_byte)(const uint8_t);
+ float freq_corr;
+} cc1101_driver_conf_t;
+
+void cc1101_init(cc1101_driver_conf_t conf);
void cc1101_reg_init(void);
void cc1101_soft_reset(void);
void cc1101_powerdown(void);