Browse Source

fix sx127x types

try-fix-comms-errors
Alex Mikhalev 6 years ago
parent
commit
82ea623747
  1. 2
      components/sx127x_driver/sx127x_internal.h
  2. 4
      components/sx127x_driver/sx127x_registers.c
  3. 4
      components/sx127x_driver/sx127x_registers.h

2
components/sx127x_driver/sx127x_internal.h

@ -70,7 +70,7 @@ typedef enum sx127x_task_state { @@ -70,7 +70,7 @@ typedef enum sx127x_task_state {
} sx127x_task_state_t;
typedef struct sx127x_packet {
char * data;
uint8_t * data;
size_t data_len;
} sx127x_packet_t;

4
components/sx127x_driver/sx127x_registers.c

@ -252,7 +252,7 @@ esp_err_t sx127x_read_lna_gain(sx127x_t *hndl, uint8_t *lna_gain) { @@ -252,7 +252,7 @@ esp_err_t sx127x_read_lna_gain(sx127x_t *hndl, uint8_t *lna_gain) {
return ESP_OK;
}
esp_err_t sx127x_write_fifo(sx127x_t *hndl, const char *data, size_t data_len) {
esp_err_t sx127x_write_fifo(sx127x_t *hndl, const uint8_t *data, size_t data_len) {
spi_transaction_t trans;
memset(&trans, 0, sizeof(trans));
trans.flags = 0;
@ -274,7 +274,7 @@ esp_err_t sx127x_write_fifo(sx127x_t *hndl, const char *data, size_t data_len) { @@ -274,7 +274,7 @@ esp_err_t sx127x_write_fifo(sx127x_t *hndl, const char *data, size_t data_len) {
return ESP_OK;
}
esp_err_t sx127x_read_fifo(sx127x_t *hndl, char *data_out, size_t data_len) {
esp_err_t sx127x_read_fifo(sx127x_t *hndl, uint8_t *data_out, size_t data_len) {
spi_transaction_t trans;
memset(&trans, 0, sizeof(trans));
trans.flags = 0;

4
components/sx127x_driver/sx127x_registers.h

@ -99,9 +99,9 @@ esp_err_t sx127x_read_pkt_snr(sx127x_hndl hdnl, int8_t *snr); @@ -99,9 +99,9 @@ esp_err_t sx127x_read_pkt_snr(sx127x_hndl hdnl, int8_t *snr);
esp_err_t sx127x_read_rssi(sx127x_hndl hdnl, int32_t *rssi);
esp_err_t sx127x_read_lna_gain(sx127x_hndl hdnl, uint8_t *lna_gain);
esp_err_t sx127x_write_fifo(sx127x_hndl hdnl, const char *data,
esp_err_t sx127x_write_fifo(sx127x_hndl hdnl, const uint8_t *data,
size_t data_len);
esp_err_t sx127x_read_fifo(sx127x_hndl hdnl, char *data_out, size_t data_len);
esp_err_t sx127x_read_fifo(sx127x_hndl hdnl, uint8_t *data_out, size_t data_len);
#ifdef __cplusplus
}

Loading…
Cancel
Save