Firmware: NVS UART bezpieczny sleep i kontrola CC1101
This commit is contained in:
1 parent
d7fc88c227
commit
032811a88c
10 files changed
+632
-1026
No files matched your search
+6
-18
@@ -1,34 +1,22 @@
|
||||
/*
|
||||
* radio.h - sterowanie CC1101 (nadawanie ramek TPMS, tryb uśpienia)
|
||||
*/
|
||||
#ifndef TPMS_RADIO_H
|
||||
#define TPMS_RADIO_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "config.h"
|
||||
#include <stdint.h>
|
||||
#include "settings.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Inicjalizacja SPI + konfiguracja CC1101. Zwraca false przy braku modulu. */
|
||||
bool radio_init(void);
|
||||
|
||||
/* Wyslij jeden bufor nadawczy (TPMS_TX_BYTES) - blokujace do zakonczenia
|
||||
* transmisji na eterze (dokladnie len*8 chipow, ~29 ms). Zwraca false
|
||||
* przy niedopelnieniu FIFO / niezakonczonej transmisji. */
|
||||
bool radio_init(const settings_t *cfg);
|
||||
bool radio_send_frame(const uint8_t *buf, uint8_t len);
|
||||
|
||||
/* Burst: n ramek tego samego bufora z odstepem TX_FRAME_GAP_MS.
|
||||
* Zwraca false, jesli ktorykolwiek z ramek sie nie udal. */
|
||||
bool radio_send_burst(const uint8_t *buf, uint8_t len, uint8_t frames);
|
||||
|
||||
/* CC1101 do trybu SLEEP (<1 uA) + przygotowanie linii pod gpio_hold. */
|
||||
bool radio_send_burst(const uint8_t *buf, uint8_t len, uint8_t frames,
|
||||
uint16_t gap_ms);
|
||||
void radio_sleep(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TPMS_RADIO_H */
|
||||
#endif
|
||||
Reference in new issue
Block a user