dont pass ->spi to read_reg, pass lora

This commit is contained in:
Morgan 'ARR\!' Allen 2020-02-11 19:58:11 -08:00
parent e74fa454db
commit 7e8fa65339

View file

@ -172,9 +172,9 @@ void lora32_set_frequency(lora32_cfg_t *lora, long frequency) {
lora32_write_reg(lora, REG_FRF_MID, (uint8_t)(frf >> 8) & 0xFF);
lora32_write_reg(lora, REG_FRF_LSB, (uint8_t)(frf >> 0) & 0xFF);
ESP_LOGD(TAG, "REG_FRF_MSB: 0x%2X", lora32_read_reg(lora->spi, REG_FRF_MSB));
ESP_LOGD(TAG, "REG_FRF_MID: 0x%2X", lora32_read_reg(lora->spi, REG_FRF_MID));
ESP_LOGD(TAG, "REG_FRF_LSB: 0x%2X", lora32_read_reg(lora->spi, REG_FRF_LSB));
ESP_LOGD(TAG, "REG_FRF_MSB: 0x%2X", lora32_read_reg(lora, REG_FRF_MSB));
ESP_LOGD(TAG, "REG_FRF_MID: 0x%2X", lora32_read_reg(lora, REG_FRF_MID));
ESP_LOGD(TAG, "REG_FRF_LSB: 0x%2X", lora32_read_reg(lora, REG_FRF_LSB));
}
void lora32_set_tx_power(lora32_cfg_t *lora, uint8_t level, uint8_t output) {
@ -191,7 +191,7 @@ void lora32_set_tx_power(lora32_cfg_t *lora, uint8_t level, uint8_t output) {
lora32_write_reg(lora, REG_PA_CONFIG, PA_BOOST | (level - 2));
}
ESP_LOGD(TAG, "REG_PA_CONFIG: 0x%2X", lora32_read_reg(lora->spi, REG_PA_CONFIG));
ESP_LOGD(TAG, "REG_PA_CONFIG: 0x%2X", lora32_read_reg(lora, REG_PA_CONFIG));
}
uint8_t lora32_parse_packet(lora32_cfg_t *lora, uint8_t size) {