Skip to content

Commit

Permalink
zephyr: radio: sx127x: override buffer read/write functions
Browse files Browse the repository at this point in the history
Override SX127xWriteBuffer and SX127xReadBuffer functions
in the Zephyr glue driver.

Co-authored-by: Alexander Wachter <alexander@wachter.cloud>
Co-authored-by: Ilya Tagunov <tagunil@gmail.com>
Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
  • Loading branch information
2 people authored and Mani-Sadhasivam committed Jun 14, 2021
1 parent cf5e2aa commit 1201962
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/radio/sx1272/sx1272.c
Expand Up @@ -1148,6 +1148,7 @@ uint8_t SX1272Read( uint32_t addr )
return data;
}

#ifndef __ZEPHYR__
void SX1272WriteBuffer( uint32_t addr, uint8_t *buffer, uint8_t size )
{
uint8_t i;
Expand Down Expand Up @@ -1182,6 +1183,7 @@ void SX1272ReadBuffer( uint32_t addr, uint8_t *buffer, uint8_t size )
//NSS = 1;
GpioWrite( &SX1272.Spi.Nss, 1 );
}
#endif

static void SX1272WriteFifo( uint8_t *buffer, uint8_t size )
{
Expand Down
2 changes: 2 additions & 0 deletions src/radio/sx1276/sx1276.c
Expand Up @@ -1288,6 +1288,7 @@ uint8_t SX1276Read( uint32_t addr )
return data;
}

#ifndef __ZEPHYR__
void SX1276WriteBuffer( uint32_t addr, uint8_t *buffer, uint8_t size )
{
uint8_t i;
Expand Down Expand Up @@ -1322,6 +1323,7 @@ void SX1276ReadBuffer( uint32_t addr, uint8_t *buffer, uint8_t size )
//NSS = 1;
GpioWrite( &SX1276.Spi.Nss, 1 );
}
#endif

static void SX1276WriteFifo( uint8_t *buffer, uint8_t size )
{
Expand Down

0 comments on commit 1201962

Please sign in to comment.