From 82ea62374729f61d1e6d24172c848b7ee25d9f79 Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Wed, 23 Jan 2019 18:57:22 -0800 Subject: [PATCH] fix sx127x types --- components/sx127x_driver/sx127x_internal.h | 2 +- components/sx127x_driver/sx127x_registers.c | 4 ++-- components/sx127x_driver/sx127x_registers.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/sx127x_driver/sx127x_internal.h b/components/sx127x_driver/sx127x_internal.h index e23d0ce..97fe214 100644 --- a/components/sx127x_driver/sx127x_internal.h +++ b/components/sx127x_driver/sx127x_internal.h @@ -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; diff --git a/components/sx127x_driver/sx127x_registers.c b/components/sx127x_driver/sx127x_registers.c index 1193f77..539d195 100644 --- a/components/sx127x_driver/sx127x_registers.c +++ b/components/sx127x_driver/sx127x_registers.c @@ -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) { 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; diff --git a/components/sx127x_driver/sx127x_registers.h b/components/sx127x_driver/sx127x_registers.h index 633430b..9a40d80 100644 --- a/components/sx127x_driver/sx127x_registers.h +++ b/components/sx127x_driver/sx127x_registers.h @@ -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 }