Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esphost add missing return values and minor fixes #443

Merged
merged 5 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions libraries/ESPhost/src/CMsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ void CMsg::reset_without_delete() {


/* -------------------------------------------------------------------------- */
CMsg::CMsg() : buf{nullptr}, dim{0}, payload_header{nullptr}, proto_dim{0}, tlv_size(esp_tlv_header_size) {
CMsg::CMsg() : buf{nullptr}, dim{0}, proto_dim{0}, payload_header{nullptr}, tlv_size(esp_tlv_header_size) {

}
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
CMsg::CMsg(uint16_t proto_size, bool use_tlv /*= true*/) : buf{nullptr},
dim{0},
payload_header{nullptr},
proto_dim{proto_size} {
CMsg::CMsg(uint16_t proto_size, bool use_tlv /*= true*/) : buf{nullptr},
dim{0},
proto_dim{proto_size},
payload_header{nullptr} {
/* -------------------------------------------------------------------------- */
uint16_t request_size = 0;
if(use_tlv) {
Expand Down Expand Up @@ -204,6 +204,7 @@ CMsg& CMsg::operator=(CMsg&& m) {
Serial.println(" bad!");
#endif
}
return *this;
}


Expand Down Expand Up @@ -442,6 +443,7 @@ void CMsg::debug_print(const char* title) {
/* -------------------------------------------------------------------------- */
bool CMsg::store_rx_buffer(const uint8_t *buffer, uint32_t d) {
/* -------------------------------------------------------------------------- */
(void)d;
/* rx_payload_len is TLV + PROTO (tlv can be present or not) */
uint16_t rx_payload_len = verify_payload_header(buffer);

Expand Down Expand Up @@ -498,6 +500,7 @@ bool CMsg::add_msg(CMsg &msg) {
return false;
}
}
return true;
}

/* -------------------------------------------------------------------------- */
Expand Down
7 changes: 0 additions & 7 deletions libraries/ESPhost/src/EspSpiDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ static spi_event_t _spi_cb_status = SPI_EVENT_TRANSFER_ABORTED;
* ############################# */

static void spi_callback(spi_callback_args_t *p_args);
static void ext_irq_callback(void);


/* execute SPI communication, send the content of tx_buffer to ESP32, put the
Expand Down Expand Up @@ -534,9 +533,3 @@ static void spi_callback(spi_callback_args_t *p_args) {
_spi_cb_status = SPI_EVENT_TRANSFER_ABORTED;
}
}

/* -------------------------------------------------------------------------- */
static void ext_irq_callback(void) {
/* -------------------------------------------------------------------------- */

}
Loading