no-OS
aducm3029_flash.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef ADUCM3029_FLASH_H_
41 #define ADUCM3029_FLASH_H_
42 
43 #define ADUCM3029_FLASH_SIZE_BYTES (0x40000u)
44 
45 #define FLASH_PAGE_SIZE_BYTES 2048
46 #define FLASH_PAGE_SIZE_WORDS 512
47 #define FLASH_PAGE_ADDR_SHIFT 11
48 
49 #define FLASH_PAGE_START_ADDRESS_MASK 0x7FF
50 #define FLASH_OFFSET_IN_PAGE(x) (((x) & FLASH_PAGE_START_ADDRESS_MASK) / 4)
51 #define FLASH_ADDRESS_PAGE_START(x) ((x) & ~FLASH_PAGE_START_ADDRESS_MASK)
52 
53 #endif /* ADUCM3029_FLASH_H_ */
FLASH_PAGE_SIZE_WORDS
#define FLASH_PAGE_SIZE_WORDS
Definition: aducm3029_flash.h:46
no_os_alloc.h
no_os_flash_write_page
int32_t no_os_flash_write_page(struct no_os_flash_dev *dev, int32_t page_no, uint32_t *data)
Definition: aducm3029_flash.c:186
no_os_flash_dev::flash_size
uint32_t flash_size
Definition: no_os_flash.h:61
FLASH_PAGE_ADDR_SHIFT
#define FLASH_PAGE_ADDR_SHIFT
Definition: aducm3029_flash.h:47
FLASH_PAGE_SIZE_BYTES
#define FLASH_PAGE_SIZE_BYTES
Definition: aducm3029_flash.h:45
no_os_timer_init
int32_t no_os_timer_init(struct no_os_timer_desc **desc, const struct no_os_timer_init_param *param)
Initialize hardware timer and the handler structure associated with it.
Definition: no_os_timer.c:63
FLASH_ADDRESS_PAGE_START
#define FLASH_ADDRESS_PAGE_START(x)
Definition: aducm3029_flash.h:51
no_os_timer_init_param::id
uint16_t id
Definition: no_os_timer.h:91
no_os_flash_dev::page_size
uint32_t page_size
Definition: no_os_flash.h:63
no_os_delay.h
Header file of Delay functions.
device
Definition: ad9361_util.h:75
no_os_timer.h
Timer control module header.
no_os_calloc
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:60
no_os_flash_write
int32_t no_os_flash_write(struct no_os_flash_dev *dev, uint32_t flash_addr, uint32_t *array, uint32_t array_size)
Definition: aducm3029_flash.c:261
aducm3029_flash.h
Header file of the flash driver for ADuCM302x.
no_os_flash_clear_page
int32_t no_os_flash_clear_page(struct no_os_flash_dev *dev, int32_t page_no)
Definition: aducm3029_flash.c:159
no_os_error.h
Error codes definition.
no_os_flash_dev::extra
void * extra
Definition: no_os_flash.h:65
adicup_flash_dev::instance
ADI_FEE_HANDLE instance
Definition: aducm3029_flash.c:64
no_os_flash_init
int32_t no_os_flash_init(struct no_os_flash_dev **device, struct no_os_flash_init_param *init_param)
Definition: aducm3029_flash.c:84
no_os_timer_start
int32_t no_os_timer_start(struct no_os_timer_desc *desc)
Start a timer.
Definition: no_os_timer.c:110
no_os_flash_dev
Flash controller device structure.
Definition: no_os_flash.h:57
no_os_timer_stop
int32_t no_os_timer_stop(struct no_os_timer_desc *desc)
Stop a timer from counting.
Definition: no_os_timer.c:126
no_os_flash_init_param
Flash controller initialization structure.
Definition: no_os_flash.h:72
no_os_flash_read
int32_t no_os_flash_read(struct no_os_flash_dev *dev, uint32_t flash_addr, uint32_t *array, uint32_t size)
Definition: aducm3029_flash.c:291
no_os_timer_counter_get
int32_t no_os_timer_counter_get(struct no_os_timer_desc *desc, uint32_t *counter)
Get the value of the counter register for the timer.
Definition: no_os_timer.c:144
no_os_timer_init_param
Structure holding the parameters for timer initialization.
Definition: no_os_timer.h:89
no_os_free
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:75
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:132
no_os_timer_counter_set
int32_t no_os_timer_counter_set(struct no_os_timer_desc *desc, uint32_t new_val)
Set the timer counter register value.
Definition: no_os_timer.c:162
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
aducm_timer_ops
const struct no_os_timer_platform_ops aducm_timer_ops
aducm3029 platform specific timer platform ops structure
Definition: aducm3029_timer.c:440
ADUCM3029_FLASH_SIZE_BYTES
#define ADUCM3029_FLASH_SIZE_BYTES
Definition: aducm3029_flash.h:43
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:120
adicup_flash_dev
Aducm3029 flash controller handler.
Definition: aducm3029_flash.c:62
aducm3029_timer.h
Header file of TIMER driver for ADuCM302x.
adicup_flash_dev::temp_ptr
uint32_t temp_ptr[FLASH_PAGE_SIZE_WORDS]
Definition: aducm3029_flash.c:69
no_os_timer_desc
Structure holding timer descriptor.
Definition: no_os_timer.h:63
no_os_flash.h
Header file for flash controller driver.
adicup_flash_dev::dfp_memory
uint8_t dfp_memory[ADI_FEE_MEMORY_SIZE]
Definition: aducm3029_flash.c:66
no_os_flash_remove
int32_t no_os_flash_remove(struct no_os_flash_dev *dev)
Definition: aducm3029_flash.c:131
no_os_flash_dev::id
uint8_t id
Definition: no_os_flash.h:59
FLASH_OFFSET_IN_PAGE
#define FLASH_OFFSET_IN_PAGE(x)
Definition: aducm3029_flash.h:50