[SX128x] Added TRNG support

pull/239/head
jgromes 2020-09-13 17:53:07 +02:00
rodzic 5e1285783a
commit 3cc55806cf
2 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -1122,6 +1122,12 @@ void SX128x::setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn) {
_mod->setRfSwitchPins(rxEn, txEn);
}
uint8_t SX128x::random() {
// it's unclear whether SX128x can measure RSSI while not receiving a packet
// this method is implemented only for PhysicalLayer compatibility
return(0);
}
uint8_t SX128x::getStatus() {
uint8_t data = 0;
SPIreadCommand(SX128X_CMD_GET_STATUS, &data, 1);

Wyświetl plik

@ -753,6 +753,13 @@ class SX128x: public PhysicalLayer {
*/
void setRfSwitchPins(RADIOLIB_PIN_TYPE rxEn, RADIOLIB_PIN_TYPE txEn);
/*!
\brief Dummy random method, to ensure PhysicalLayer compatibility.
\returns Always returns 0.
*/
uint8_t random();
#ifndef RADIOLIB_GODMODE
protected:
#endif