Compare commits

..

No commits in common. "150a23dbafb39d1b9458107a67894367db1935a9" and "985939ea80912726d0f418f8ee6bea29f7c6a7c3" have entirely different histories.

2 changed files with 3 additions and 5 deletions

View file

@ -103,6 +103,7 @@ typedef struct {
} lora32_handle_t;
typedef struct lora32_cfg_t {
char *name;
uint8_t nss;
uint8_t cipo;
uint8_t copi;
@ -156,7 +157,6 @@ void lora32_send(lora32_cfg_t *config, uint8_t *data, uint8_t len);
void lora32_set_bandwidth(lora32_cfg_t *lora, uint8_t bw);
void lora32_set_coding_rate(lora32_cfg_t *lora, uint8_t cr);
void lora32_set_spreadfactor(lora32_cfg_t *lora, uint8_t factor);
uint8_t lora32_get_spreadfactor(lora32_cfg_t *lora);
void lora32_read_data(lora32_cfg_t *lora, uint8_t *data);
void lora32_sleep(lora32_cfg_t *lora);
void lora32_standby(lora32_cfg_t *lora);

View file

@ -240,7 +240,7 @@ void lora32_toggle_reset(lora32_cfg_t *config) {
vTaskDelay(100 / portTICK_PERIOD_MS); // 5ms before available
}
uint8_t lora32_get_spreadfactor(lora32_cfg_t *lora) {
uint8_t lora32_get_spreadingfactor(lora32_cfg_t *lora) {
return (lora32_read_reg(lora, REG_MODEM_CONFIG_2) >> 4);
}
@ -260,8 +260,6 @@ void lora32_set_spreadfactor(lora32_cfg_t *lora, uint8_t factor) {
ESP_LOGI(TAG, "lora32_set_spreadfactor: %d", factor);
lora32_write_reg(lora, REG_MODEM_CONFIG_2, (lora32_read_reg(lora, REG_MODEM_CONFIG_2) & 0x0F) | ((factor << 4) & 0xF0));
lora->spreadingFactor = factor;
}
void lora32_enable_single_rx(lora32_cfg_t *lora) {
@ -322,7 +320,7 @@ long lora32_get_bandwidth(lora32_cfg_t *lora) {
}
void lora32_set_ldo_flag(lora32_cfg_t *lora) {
long symbolDuration = 1000 / (lora32_get_bandwidth(lora) / (1L << lora32_get_spreadfactor(lora)));
long symbolDuration = 1000 / (lora32_get_bandwidth(lora) / (1L << lora32_get_spreadingfactor(lora)));
ESP_LOGI(TAG, "symbolDuration: %ld", symbolDuration);