Skip to content

Commit

Permalink
firmware: drivers: si446x: Fixing function definition #76
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelboing committed May 11, 2022
1 parent 05058cf commit 19a4b14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion firmware/drivers/si446x/si446x.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,8 @@ bool si446x_enter_standby_mode(void)
{
if (si446x_mode == SI446X_MODE_STANDBY)
{
return;
/*TODO*/
return -1;
}

#if defined(CONFIG_DRIVERS_DEBUG_ENABLED) && (CONFIG_DRIVERS_DEBUG_ENABLED == 1)
Expand Down
8 changes: 4 additions & 4 deletions firmware/drivers/si446x/si446x.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ void si446x_spi_disable(void);
*
* \param[in] size is the size of the data to be transfered.
*
* \return None.
* \return The status/error code.
*/
void si446x_spi_write(uint8_t *data, uint16_t size);
int si446x_spi_write(uint8_t *data, uint16_t size);

/**
* \brief Reads data from the SPI interface.
Expand All @@ -371,9 +371,9 @@ void si446x_spi_write(uint8_t *data, uint16_t size);
*
* \param[in] size is how many bytes will be read from the SPI interface.
*
* \return None;
* \return The status/error code.
*/
void si446x_spi_read(uint8_t *data, uint16_t size);
int si446x_spi_read(uint8_t *data, uint16_t size);

/**
* \brief Makes a byte transfer in the SPI port (Writing and reading).
Expand Down
4 changes: 2 additions & 2 deletions firmware/drivers/si446x/si446x_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ void si446x_spi_disable(void)
spi_select_slave(SPI_PORT_3, SPI_CS_0, false);
}

void si446x_spi_write(uint8_t *data, uint16_t size)
int si446x_spi_write(uint8_t *data, uint16_t size)
{
return spi_write(SPI_PORT_3, SPI_CS_0, data, size);
}

void si446x_spi_read(uint8_t *data, uint16_t size)
int si446x_spi_read(uint8_t *data, uint16_t size)
{
return spi_read(SPI_PORT_3, SPI_CS_0, data, size);
}
Expand Down

0 comments on commit 19a4b14

Please sign in to comment.