minor clean up

This commit is contained in:
hathach committed 2018-10-25 16:38:24 +07:00
1 parent 90b06938e6
commit d97818faed
2 files changed
+12

No files matched your search

+6
View File
@@ -51,6 +51,9 @@ bool flash_nrf5x_erase(uint32_t addr);
uint32_t flash_nrf5x_write (uint32_t dst, void const * src, uint32_t len);
uint32_t flash_nrf5x_read (void* dst, uint32_t src, uint32_t len);
//--------------------------------------------------------------------+
// Write helper
//--------------------------------------------------------------------+
static inline uint32_t flash_nrf5x_write8 (uint32_t dst, uint8_t num)
{
flash_nrf5x_write(dst, &num, sizeof(num));
@@ -68,6 +71,9 @@ static inline uint32_t flash_nrf5x_write32 (uint32_t dst, uint8_t num)
return sizeof(num);
}
//--------------------------------------------------------------------+
// Read helper
//--------------------------------------------------------------------+
static inline uint8_t flash_nrf5x_read8 (uint32_t src)
{
uint8_t num;
+6
View File
@@ -53,6 +53,9 @@ uint32_t flash_qspi_size (void);
uint32_t flash_qspi_write (uint32_t dst, void const * src, uint32_t len);
uint32_t flash_qspi_read (void* dst, uint32_t src, uint32_t len);
//--------------------------------------------------------------------+
// Write helper
//--------------------------------------------------------------------+
static inline uint32_t flash_qspi_write8 (uint32_t dst, uint8_t num)
{
flash_qspi_write(dst, &num, sizeof(num));
@@ -70,6 +73,9 @@ static inline uint32_t flash_qspi_write32 (uint32_t dst, uint8_t num)
return sizeof(num);
}
//--------------------------------------------------------------------+
// Read helper
//--------------------------------------------------------------------+
static inline uint8_t flash_qspi_read8 (uint32_t src)
{
uint8_t num;