Loading...
Searching...
No Matches
cc1101.h
1#pragma once
2
3#include "cc1101_regs.h"
4
5#include <stdbool.h>
6#include <stdint.h>
7#include <furi_hal_spi.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/* Low level API */
14
22CC1101Status cc1101_strobe(FuriHalSpiBusHandle* handle, uint8_t strobe);
23
32CC1101Status cc1101_write_reg(FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t data);
33
42CC1101Status cc1101_read_reg(FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t* data);
43
44/* High level API */
45
52CC1101Status cc1101_reset(FuriHalSpiBusHandle* handle);
53
60CC1101Status cc1101_get_status(FuriHalSpiBusHandle* handle);
61
70bool cc1101_wait_status_state(FuriHalSpiBusHandle* handle, CC1101State state, uint32_t timeout_us);
71
78CC1101Status cc1101_shutdown(FuriHalSpiBusHandle* handle);
79
86uint8_t cc1101_get_partnumber(FuriHalSpiBusHandle* handle);
87
94uint8_t cc1101_get_version(FuriHalSpiBusHandle* handle);
95
102uint8_t cc1101_get_rssi(FuriHalSpiBusHandle* handle);
103
110CC1101Status cc1101_calibrate(FuriHalSpiBusHandle* handle);
111
116CC1101Status cc1101_switch_to_idle(FuriHalSpiBusHandle* handle);
117
124CC1101Status cc1101_switch_to_rx(FuriHalSpiBusHandle* handle);
125
132CC1101Status cc1101_switch_to_tx(FuriHalSpiBusHandle* handle);
133
140CC1101Status cc1101_flush_rx(FuriHalSpiBusHandle* handle);
141
146CC1101Status cc1101_flush_tx(FuriHalSpiBusHandle* handle);
147
155uint32_t cc1101_set_frequency(FuriHalSpiBusHandle* handle, uint32_t value);
156
164uint32_t cc1101_set_intermediate_frequency(FuriHalSpiBusHandle* handle, uint32_t value);
165
171void cc1101_set_pa_table(FuriHalSpiBusHandle* handle, const uint8_t value[8]);
172
181uint8_t cc1101_write_fifo(FuriHalSpiBusHandle* handle, const uint8_t* data, uint8_t size);
182
191uint8_t cc1101_read_fifo(FuriHalSpiBusHandle* handle, uint8_t* data, uint8_t* size);
192
193#ifdef __cplusplus
194}
195#endif
Definition cc1101_regs.h:189
FuriHal spi handle.
Definition furi_hal_spi_types.h:51