no-OS
aducm3029_flash.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef ADUCM3029_FLASH_H_
35 #define ADUCM3029_FLASH_H_
36 
37 #define ADUCM3029_FLASH_SIZE_BYTES (0x40000u)
38 
39 #define FLASH_PAGE_SIZE_BYTES 2048
40 #define FLASH_PAGE_SIZE_WORDS 512
41 #define FLASH_PAGE_ADDR_SHIFT 11
42 
43 #define FLASH_PAGE_START_ADDRESS_MASK 0x7FF
44 #define FLASH_OFFSET_IN_PAGE(x) (((x) & FLASH_PAGE_START_ADDRESS_MASK) / 4)
45 #define FLASH_ADDRESS_PAGE_START(x) ((x) & ~FLASH_PAGE_START_ADDRESS_MASK)
46 
47 #endif /* ADUCM3029_FLASH_H_ */
FLASH_PAGE_SIZE_WORDS
#define FLASH_PAGE_SIZE_WORDS
Definition: aducm3029_flash.h:40
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:180
no_os_flash_dev::flash_size
uint32_t flash_size
Definition: no_os_flash.h:55
FLASH_PAGE_ADDR_SHIFT
#define FLASH_PAGE_ADDR_SHIFT
Definition: aducm3029_flash.h:41
FLASH_PAGE_SIZE_BYTES
#define FLASH_PAGE_SIZE_BYTES
Definition: aducm3029_flash.h:39
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:57
FLASH_ADDRESS_PAGE_START
#define FLASH_ADDRESS_PAGE_START(x)
Definition: aducm3029_flash.h:45
no_os_timer_init_param::id
uint16_t id
Definition: no_os_timer.h:85
no_os_flash_dev::page_size
uint32_t page_size
Definition: no_os_flash.h:57
no_os_delay.h
Header file of Delay functions.
device
Definition: ad9361_util.h:69
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:54
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:255
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:153
no_os_error.h
Error codes definition.
no_os_flash_dev::extra
void * extra
Definition: no_os_flash.h:59
adicup_flash_dev::instance
ADI_FEE_HANDLE instance
Definition: aducm3029_flash.c:58
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:78
no_os_timer_start
int32_t no_os_timer_start(struct no_os_timer_desc *desc)
Start a timer.
Definition: no_os_timer.c:104
no_os_flash_dev
Flash controller device structure.
Definition: no_os_flash.h:51
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:120
no_os_flash_init_param
Flash controller initialization structure.
Definition: no_os_flash.h:66
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:285
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:138
no_os_timer_init_param
Structure holding the parameters for timer initialization.
Definition: no_os_timer.h:83
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:69
no_os_mdelay
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
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:156
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
aducm_timer_ops
const struct no_os_timer_platform_ops aducm_timer_ops
aducm3029 platform specific timer platform ops structure
Definition: aducm3029_timer.c:434
ADUCM3029_FLASH_SIZE_BYTES
#define ADUCM3029_FLASH_SIZE_BYTES
Definition: aducm3029_flash.h:37
no_os_udelay
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
adicup_flash_dev
Aducm3029 flash controller handler.
Definition: aducm3029_flash.c:56
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:63
no_os_timer_desc
Structure holding timer descriptor.
Definition: no_os_timer.h:57
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:60
no_os_flash_remove
int32_t no_os_flash_remove(struct no_os_flash_dev *dev)
Definition: aducm3029_flash.c:125
no_os_flash_dev::id
uint8_t id
Definition: no_os_flash.h:53
FLASH_OFFSET_IN_PAGE
#define FLASH_OFFSET_IN_PAGE(x)
Definition: aducm3029_flash.h:44