change bandwidth enum to typedef
This commit is contained in:
parent
04da5a472d
commit
2e721f68da
2 changed files with 5 additions and 5 deletions
|
@ -80,9 +80,9 @@ enum freq {
|
|||
F433, F866, F915
|
||||
} lora32_freq;
|
||||
|
||||
enum bandwidth {
|
||||
typedef enum {
|
||||
B78, B104, B156, B208, B3125, B417, B625, B125, B250, B500
|
||||
};
|
||||
} bandwidth;
|
||||
|
||||
const long long frequencies[3];
|
||||
const long bandwidths[9];
|
||||
|
@ -103,7 +103,7 @@ typedef struct lora32_cfg_t {
|
|||
uint8_t fifoIdx;
|
||||
|
||||
long frequency;
|
||||
enum bandwidth bandwidth;
|
||||
bandwidth bandwidth;
|
||||
|
||||
uint8_t spreadingFactor;
|
||||
uint8_t codingRate;
|
||||
|
@ -130,7 +130,7 @@ void lora32_dump_regs(lora32_cfg_t *lora);
|
|||
void lora32_enable_continuous_rx(lora32_cfg_t *lora);
|
||||
void lora32_enable_cad(lora32_cfg_t *lora);
|
||||
void lora32_send(lora32_cfg_t *config, uint8_t *data, uint8_t len);
|
||||
void lora32_set_bandwidth(lora32_cfg_t *lora, enum bandwidth bw);
|
||||
void lora32_set_bandwidth(lora32_cfg_t *lora, bandwidth bw);
|
||||
void lora32_set_coding_rate(lora32_cfg_t *lora, uint8_t cr);
|
||||
void lora32_set_spreadfactor(lora32_cfg_t *lora, uint8_t factor);
|
||||
void lora32_read_data(lora32_cfg_t *lora, uint8_t *data);
|
||||
|
|
|
@ -262,7 +262,7 @@ void lora32_enable_cad(lora32_cfg_t *lora) {
|
|||
lora32_write_reg(lora, REG_OP_MODE, MODE_LONG_RANGE_MODE | MODE_CAD_DETECT);
|
||||
}
|
||||
|
||||
void lora32_set_bandwidth(lora32_cfg_t *lora, enum bandwidth bw) {
|
||||
void lora32_set_bandwidth(lora32_cfg_t *lora, bandwidth bw) {
|
||||
uint8_t modem_config_1 = lora32_read_reg(lora, REG_MODEM_CONFIG_1);
|
||||
|
||||
ESP_LOGI(TAG, "lora32_set_bandwidth: %d", bw);
|
||||
|
|
Loading…
Reference in a new issue