[rtdef] use lower-case to define attributes (#6728)
* [rtdef] rename RT_WEAK attribute as rt_weak * [rtdef] rename RT_USED attribute as rt_used * [rtdef] rename RT_SECTION attribute as rt_section * [rtdef] rename ALIGN attribute as rt_align * [legacy] add RT_USED ALIGN RT_SECTION RT_WEAK as legacy support
This commit is contained in:
parent
a4b8762d85
commit
99bdf978d7
|
@ -87,7 +87,7 @@ void rt_hw_us_delay(rt_uint32_t us)
|
||||||
/**
|
/**
|
||||||
* this function will initial ifx board.
|
* this function will initial ifx board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init()
|
rt_weak void rt_hw_board_init()
|
||||||
{
|
{
|
||||||
cy_bsp_all_init();
|
cy_bsp_all_init();
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#define configTOTAL_HEAP_SIZE (24*1024)
|
#define configTOTAL_HEAP_SIZE (24*1024)
|
||||||
/* Allocate the memory for the heap. */
|
/* Allocate the memory for the heap. */
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
|
static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
|
||||||
/**
|
/**
|
||||||
* This is the timer interrupt service routine.
|
* This is the timer interrupt service routine.
|
||||||
|
|
|
@ -37,7 +37,7 @@ static int read(long offset, uint8_t *buf, size_t size)
|
||||||
rt_size_t sector_offset;
|
rt_size_t sector_offset;
|
||||||
rt_size_t remain_size = size;
|
rt_size_t remain_size = size;
|
||||||
rt_size_t req_size;
|
rt_size_t req_size;
|
||||||
ALIGN(4) uint8_t buffer[SECTOR_SIZE];
|
rt_align(4) uint8_t buffer[SECTOR_SIZE];
|
||||||
|
|
||||||
while (remain_size)
|
while (remain_size)
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,7 @@ static int write(long offset, const uint8_t *buf, size_t size)
|
||||||
rt_size_t sector_offset;
|
rt_size_t sector_offset;
|
||||||
rt_size_t remain_size = size;
|
rt_size_t remain_size = size;
|
||||||
rt_size_t req_size;
|
rt_size_t req_size;
|
||||||
ALIGN(4) uint8_t buffer[SECTOR_SIZE];
|
rt_align(4) uint8_t buffer[SECTOR_SIZE];
|
||||||
|
|
||||||
while (remain_size)
|
while (remain_size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,7 +58,7 @@ static inline uint64_t arch_counter_get_cntpct(void)
|
||||||
return cval;
|
return cval;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK int msleep(unsigned int msecs)
|
rt_weak int msleep(unsigned int msecs)
|
||||||
{
|
{
|
||||||
rt_thread_mdelay(msecs);
|
rt_thread_mdelay(msecs);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -76,7 +76,7 @@ void rt_hw_us_delay(rt_uint32_t us)
|
||||||
while (arch_counter_get_cntpct() - start <= target) ;
|
while (arch_counter_get_cntpct() - start <= target) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK int usleep(unsigned int usecs)
|
rt_weak int usleep(unsigned int usecs)
|
||||||
{
|
{
|
||||||
int tickDiv = 1000 * (1000 / CONFIG_HZ);
|
int tickDiv = 1000 * (1000 / CONFIG_HZ);
|
||||||
int ticks = usecs / tickDiv;
|
int ticks = usecs / tickDiv;
|
||||||
|
@ -189,7 +189,7 @@ void awos_arch_flush_icache_all(void)
|
||||||
rt_hw_cpu_icache_invalidate_all();
|
rt_hw_cpu_icache_invalidate_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK int32_t hal_spi_gpio_cfg_count(const char *secname)
|
rt_weak int32_t hal_spi_gpio_cfg_count(const char *secname)
|
||||||
{
|
{
|
||||||
rt_kprintf("FUNCTION:%s not implemented.\n", __FUNCTION__);
|
rt_kprintf("FUNCTION:%s not implemented.\n", __FUNCTION__);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -218,13 +218,13 @@ int32_t esCFG_GetGPIOSecKeyCount(char *GPIOSecName)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK int hal_spi_gpio_cfg_load(user_gpio_set_t *gpio_cfg, int32_t GPIONum, int id)
|
rt_weak int hal_spi_gpio_cfg_load(user_gpio_set_t *gpio_cfg, int32_t GPIONum, int id)
|
||||||
{
|
{
|
||||||
rt_kprintf("FUNCTION:%s not implemented.\n", __FUNCTION__);
|
rt_kprintf("FUNCTION:%s not implemented.\n", __FUNCTION__);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK int hal_i2c_gpio_cfg_load(user_gpio_set_t *gpio_cfg, int32_t GPIONum, int id)
|
rt_weak int hal_i2c_gpio_cfg_load(user_gpio_set_t *gpio_cfg, int32_t GPIONum, int id)
|
||||||
{
|
{
|
||||||
rt_kprintf("FUNCTION:%s not implemented.\n", __FUNCTION__);
|
rt_kprintf("FUNCTION:%s not implemented.\n", __FUNCTION__);
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -808,7 +808,7 @@ static s32 start_process(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK s32 lcd_vsync_event_process(u32 sel)
|
rt_weak s32 lcd_vsync_event_process(u32 sel)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -390,7 +390,7 @@ static void uart_handle_busy(uart_port_t uart_port)
|
||||||
hal_writeb(uart_priv->mcr, uart_base + UART_MCR);
|
hal_writeb(uart_priv->mcr, uart_base + UART_MCR);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void hal_uart_handler_hook(uart_port_t uart_port)
|
rt_weak void hal_uart_handler_hook(uart_port_t uart_port)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ struct sdio_drv
|
||||||
|
|
||||||
#ifdef CONFIG_MMC_USE_DMA
|
#ifdef CONFIG_MMC_USE_DMA
|
||||||
#ifdef TINA_USING_SDIO0
|
#ifdef TINA_USING_SDIO0
|
||||||
ALIGN(32) static rt_uint8_t dma_buffer[64 * 1024];
|
rt_align(32) static rt_uint8_t dma_buffer[64 * 1024];
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ static int mmc_update_clk(tina_mmc_t mmc)
|
||||||
|
|
||||||
static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
|
static rt_err_t mmc_trans_data_by_dma(tina_mmc_t mmc, struct mmc_xfe_des *xfe)
|
||||||
{
|
{
|
||||||
ALIGN(32) static struct mmc_des_v4p1 pdes[128]; // mast ALIGN(32)
|
rt_align(32) static struct mmc_des_v4p1 pdes[128];
|
||||||
unsigned i, rval;
|
unsigned i, rval;
|
||||||
unsigned des_idx;
|
unsigned des_idx;
|
||||||
unsigned length = xfe->size * xfe->num;
|
unsigned length = xfe->size * xfe->num;
|
||||||
|
|
|
@ -11,14 +11,14 @@
|
||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
RT_WEAK void machine_reset(void)
|
rt_weak void machine_reset(void)
|
||||||
{
|
{
|
||||||
rt_kprintf("reboot system...\n");
|
rt_kprintf("reboot system...\n");
|
||||||
rt_hw_interrupt_disable();
|
rt_hw_interrupt_disable();
|
||||||
while (1);
|
while (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void machine_shutdown(void)
|
rt_weak void machine_shutdown(void)
|
||||||
{
|
{
|
||||||
rt_kprintf("shutdown...\n");
|
rt_kprintf("shutdown...\n");
|
||||||
rt_hw_interrupt_disable();
|
rt_hw_interrupt_disable();
|
||||||
|
|
|
@ -93,7 +93,7 @@ void rt_hw_us_delay(rt_uint32_t us)
|
||||||
/**
|
/**
|
||||||
* This function will config the board for initialization.
|
* This function will config the board for initialization.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init()
|
rt_weak void rt_hw_board_init()
|
||||||
{
|
{
|
||||||
/* Systick initialization */
|
/* Systick initialization */
|
||||||
rt_hw_systick_init();
|
rt_hw_systick_init();
|
||||||
|
|
|
@ -109,7 +109,7 @@ void rt_hw_us_delay(rt_uint32_t us)
|
||||||
/**
|
/**
|
||||||
* this function will initial at32 board.
|
* this function will initial at32 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init()
|
rt_weak void rt_hw_board_init()
|
||||||
{
|
{
|
||||||
/* system clock initialization */
|
/* system clock initialization */
|
||||||
system_clock_config();
|
system_clock_config();
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct rt_hw_sdio
|
||||||
struct sdio_pkg *pkg;
|
struct sdio_pkg *pkg;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(SDIO_ALIGN_LEN)
|
rt_align(SDIO_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
||||||
|
|
||||||
static rt_uint32_t at32_sdio_clk_get(struct at32_sdio *hw_sdio)
|
static rt_uint32_t at32_sdio_clk_get(struct at32_sdio *hw_sdio)
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
static int rt_led_app_init(void);
|
static int rt_led_app_init(void);
|
||||||
|
|
||||||
RT_WEAK int main(void)
|
rt_weak int main(void)
|
||||||
{
|
{
|
||||||
#ifdef RT_USING_SDIO
|
#ifdef RT_USING_SDIO
|
||||||
int timeout = 0;
|
int timeout = 0;
|
||||||
|
|
|
@ -29,10 +29,10 @@
|
||||||
所有在中断中使用的函数或数据需要放在 RAM 中,否则会导致系统运行报错。具体做法可以参考下面
|
所有在中断中使用的函数或数据需要放在 RAM 中,否则会导致系统运行报错。具体做法可以参考下面
|
||||||
|
|
||||||
``` c
|
``` c
|
||||||
RT_SECTION(".irq.example.str")
|
rt_section(".irq.example.str")
|
||||||
static const char example_info[] = "example 0x%x";
|
static const char example_info[] = "example 0x%x";
|
||||||
|
|
||||||
RT_SECTION(".irq.example")
|
rt_section(".irq.example")
|
||||||
void example_isr(void)
|
void example_isr(void)
|
||||||
{
|
{
|
||||||
rt_kprintf(example_info, 11);
|
rt_kprintf(example_info, 11);
|
||||||
|
|
|
@ -68,20 +68,20 @@ void hal_printf(const char *fmt, ...)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RT_SECTION(".irq")
|
rt_section(".irq")
|
||||||
void os_interrupt_enter(void)
|
void os_interrupt_enter(void)
|
||||||
{
|
{
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq")
|
rt_section(".irq")
|
||||||
void os_interrupt_leave(void)
|
void os_interrupt_leave(void)
|
||||||
{
|
{
|
||||||
rt_interrupt_leave();
|
rt_interrupt_leave();
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef void (*isr_t)(void);
|
typedef void (*isr_t)(void);
|
||||||
RT_SECTION(".irq")
|
rt_section(".irq")
|
||||||
isr_t register_isr(int vector, isr_t isr)
|
isr_t register_isr(int vector, isr_t isr)
|
||||||
{
|
{
|
||||||
char buf[8] = {0};
|
char buf[8] = {0};
|
||||||
|
@ -90,7 +90,7 @@ isr_t register_isr(int vector, isr_t isr)
|
||||||
rt_hw_interrupt_install(vector, handle, RT_NULL, buf);
|
rt_hw_interrupt_install(vector, handle, RT_NULL, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.timer")
|
rt_section(".irq.timer")
|
||||||
void timer0_isr(int vector, void *param)
|
void timer0_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
|
@ -136,7 +136,7 @@ void hal_udelay(uint32_t nus)
|
||||||
*
|
*
|
||||||
* @param us microseconds.
|
* @param us microseconds.
|
||||||
*/
|
*/
|
||||||
RT_SECTION(".com_text")
|
rt_section(".com_text")
|
||||||
void rt_hw_us_delay(rt_uint32_t us)
|
void rt_hw_us_delay(rt_uint32_t us)
|
||||||
{
|
{
|
||||||
rt_uint32_t ticks;
|
rt_uint32_t ticks;
|
||||||
|
@ -213,7 +213,7 @@ void rt_hw_board_init(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.cache")
|
rt_section(".irq.cache")
|
||||||
void cache_init(void)
|
void cache_init(void)
|
||||||
{
|
{
|
||||||
os_cache_init();
|
os_cache_init();
|
||||||
|
@ -221,7 +221,7 @@ void cache_init(void)
|
||||||
rt_mutex_init(&mutex_cache, "cache_mutex", RT_IPC_FLAG_PRIO);
|
rt_mutex_init(&mutex_cache, "cache_mutex", RT_IPC_FLAG_PRIO);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.cache")
|
rt_section(".irq.cache")
|
||||||
void os_spiflash_lock(void)
|
void os_spiflash_lock(void)
|
||||||
{
|
{
|
||||||
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0))
|
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0))
|
||||||
|
@ -230,7 +230,7 @@ void os_spiflash_lock(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.cache")
|
rt_section(".irq.cache")
|
||||||
void os_spiflash_unlock(void)
|
void os_spiflash_unlock(void)
|
||||||
{
|
{
|
||||||
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0))
|
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0))
|
||||||
|
@ -239,7 +239,7 @@ void os_spiflash_unlock(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.cache")
|
rt_section(".irq.cache")
|
||||||
void os_cache_lock(void)
|
void os_cache_lock(void)
|
||||||
{
|
{
|
||||||
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0))
|
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0))
|
||||||
|
@ -248,7 +248,7 @@ void os_cache_lock(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.cache")
|
rt_section(".irq.cache")
|
||||||
void os_cache_unlock(void)
|
void os_cache_unlock(void)
|
||||||
{
|
{
|
||||||
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0))
|
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0))
|
||||||
|
@ -257,7 +257,7 @@ void os_cache_unlock(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.err.str")
|
rt_section(".irq.err.str")
|
||||||
static const char stack_info[] = "thread sp=0x%x name=%s";
|
static const char stack_info[] = "thread sp=0x%x name=%s";
|
||||||
|
|
||||||
void rt_hw_console_output(const char *str)
|
void rt_hw_console_output(const char *str)
|
||||||
|
@ -271,7 +271,7 @@ void rt_hw_console_output(const char *str)
|
||||||
* @note (IRQ in Flash: %x %x - %x %x\n, -, rt_interrupt_nest, PC, miss_addr)
|
* @note (IRQ in Flash: %x %x - %x %x\n, -, rt_interrupt_nest, PC, miss_addr)
|
||||||
* miss_addr: The address in map file minus 0x10000000
|
* miss_addr: The address in map file minus 0x10000000
|
||||||
*/
|
*/
|
||||||
RT_SECTION(".irq.err")
|
rt_section(".irq.err")
|
||||||
void exception_isr(void)
|
void exception_isr(void)
|
||||||
{
|
{
|
||||||
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
|
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
|
||||||
|
|
|
@ -109,7 +109,7 @@ void dac_start(void)
|
||||||
//AUANGCON1 |= BIT(3); // pa mute
|
//AUANGCON1 |= BIT(3); // pa mute
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.audio")
|
rt_section(".irq.audio")
|
||||||
void audio_sem_post(void)
|
void audio_sem_post(void)
|
||||||
{
|
{
|
||||||
rt_sem_release(snd_dev.semaphore);
|
rt_sem_release(snd_dev.semaphore);
|
||||||
|
@ -445,7 +445,7 @@ static struct rt_audio_ops ops =
|
||||||
.buffer_info = sound_buffer_info,
|
.buffer_info = sound_buffer_info,
|
||||||
};
|
};
|
||||||
|
|
||||||
RT_SECTION(".irq.audio")
|
rt_section(".irq.audio")
|
||||||
static void audio_isr(int vector, void *param)
|
static void audio_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
|
|
|
@ -16,21 +16,21 @@ static rt_mq_t drv_mq = RT_NULL;
|
||||||
void uart0_irq_process(void);
|
void uart0_irq_process(void);
|
||||||
void uart1_irq_process(void);
|
void uart1_irq_process(void);
|
||||||
|
|
||||||
RT_SECTION(".irq.uart")
|
rt_section(".irq.uart")
|
||||||
void uart0_irq_post(void)
|
void uart0_irq_post(void)
|
||||||
{
|
{
|
||||||
rt_uint8_t mq_msg = MSG_UART0_IRQ;
|
rt_uint8_t mq_msg = MSG_UART0_IRQ;
|
||||||
rt_mq_send(drv_mq, &mq_msg, 1);
|
rt_mq_send(drv_mq, &mq_msg, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.uart")
|
rt_section(".irq.uart")
|
||||||
void uart1_irq_post(void)
|
void uart1_irq_post(void)
|
||||||
{
|
{
|
||||||
rt_uint8_t mq_msg = MSG_UART1_IRQ;
|
rt_uint8_t mq_msg = MSG_UART1_IRQ;
|
||||||
rt_mq_send(drv_mq, &mq_msg, 1);
|
rt_mq_send(drv_mq, &mq_msg, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.uart")
|
rt_section(".irq.uart")
|
||||||
void uart2_irq_post(void)
|
void uart2_irq_post(void)
|
||||||
{
|
{
|
||||||
rt_uint8_t mq_msg = MSG_UART2_IRQ;
|
rt_uint8_t mq_msg = MSG_UART2_IRQ;
|
||||||
|
|
|
@ -68,7 +68,7 @@ static struct ab32_hwtimer ab32_hwtimer_obj[] =
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
RT_SECTION(".irq.timer")
|
rt_section(".irq.timer")
|
||||||
static void _rt_device_hwtimer_isr(rt_hwtimer_t *timer)
|
static void _rt_device_hwtimer_isr(rt_hwtimer_t *timer)
|
||||||
{
|
{
|
||||||
RT_ASSERT(timer != RT_NULL);
|
RT_ASSERT(timer != RT_NULL);
|
||||||
|
@ -216,7 +216,7 @@ static const struct rt_hwtimer_ops _ops =
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(BSP_USING_TIM2) || defined(BSP_USING_TIM4) || defined(BSP_USING_TIM5)
|
#if defined(BSP_USING_TIM2) || defined(BSP_USING_TIM4) || defined(BSP_USING_TIM5)
|
||||||
RT_SECTION(".irq.timer")
|
rt_section(".irq.timer")
|
||||||
void timer2_4_5_isr(int vector, void *param)
|
void timer2_4_5_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
|
@ -243,7 +243,7 @@ void timer2_4_5_isr(int vector, void *param)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BSP_USING_TIM3
|
#ifdef BSP_USING_TIM3
|
||||||
RT_SECTION(".irq.timer")
|
rt_section(".irq.timer")
|
||||||
void timer3_isr(int vector, void *param)
|
void timer3_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
|
@ -254,7 +254,7 @@ void timer3_isr(int vector, void *param)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BSP_USING_TIM1
|
#ifdef BSP_USING_TIM1
|
||||||
RT_SECTION(".irq.timer")
|
rt_section(".irq.timer")
|
||||||
void timer1_isr(int vector, void *param)
|
void timer1_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
|
|
|
@ -57,7 +57,7 @@ static struct ab32_irrx_data _irrx = {0};
|
||||||
* @param addr inverted address Extended NEC: 16bits address
|
* @param addr inverted address Extended NEC: 16bits address
|
||||||
* @param cmd inverted command
|
* @param cmd inverted command
|
||||||
*/
|
*/
|
||||||
RT_SECTION(".irq.irrx")
|
rt_section(".irq.irrx")
|
||||||
rt_uint8_t ab32_get_irkey(rt_uint16_t *addr, rt_uint16_t *cmd)
|
rt_uint8_t ab32_get_irkey(rt_uint16_t *addr, rt_uint16_t *cmd)
|
||||||
{
|
{
|
||||||
if (_irrx.cnt != 32) {
|
if (_irrx.cnt != 32) {
|
||||||
|
@ -82,7 +82,7 @@ void ab32_clr_irkey(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef BSP_USING_IRRX_HW
|
#ifdef BSP_USING_IRRX_HW
|
||||||
RT_SECTION(".irq.irrx")
|
rt_section(".irq.irrx")
|
||||||
static void irrx_isr(int vector, void *param)
|
static void irrx_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
|
@ -133,7 +133,7 @@ static void _irrx_hw_init(void)
|
||||||
|
|
||||||
#define TMR3_RCLK (1000u) //xosc26m_div 1M
|
#define TMR3_RCLK (1000u) //xosc26m_div 1M
|
||||||
|
|
||||||
RT_SECTION(".irq.irrx")
|
rt_section(".irq.irrx")
|
||||||
static void irrx_isr(int vector, void *param)
|
static void irrx_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
rt_uint32_t tmrcnt;
|
rt_uint32_t tmrcnt;
|
||||||
|
|
|
@ -47,7 +47,7 @@ struct rthw_sdio
|
||||||
struct sdio_pkg *pkg;
|
struct sdio_pkg *pkg;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(SDIO_ALIGN_LEN)
|
rt_align(SDIO_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
||||||
|
|
||||||
static rt_uint8_t sd_baud = 119;
|
static rt_uint8_t sd_baud = 119;
|
||||||
|
@ -496,7 +496,7 @@ static rt_int32_t rthw_sd_detect(struct rt_mmcsd_host *host)
|
||||||
* @param host rt_mmcsd_host
|
* @param host rt_mmcsd_host
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
RT_SECTION(".irq.sdio")
|
rt_section(".irq.sdio")
|
||||||
void rthw_sdio_irq_process(struct rt_mmcsd_host *host)
|
void rthw_sdio_irq_process(struct rt_mmcsd_host *host)
|
||||||
{
|
{
|
||||||
int complete = 0;
|
int complete = 0;
|
||||||
|
@ -617,7 +617,7 @@ static rt_err_t _dma_rxconfig(rt_uint32_t *dst, int Size)
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_SECTION(".irq.sdio")
|
rt_section(".irq.sdio")
|
||||||
void sdio_isr(int vector, void *param)
|
void sdio_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
/* enter interrupt */
|
/* enter interrupt */
|
||||||
|
|
|
@ -233,7 +233,7 @@ void uart2_irq_process(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RT_SECTION(".irq.usart")
|
rt_section(".irq.usart")
|
||||||
static void uart_isr(int vector, void *param)
|
static void uart_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
|
@ -267,7 +267,7 @@ static void uart_isr(int vector, void *param)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HUART_ENABLE
|
#ifdef HUART_ENABLE
|
||||||
RT_SECTION(".irq.huart")
|
rt_section(".irq.huart")
|
||||||
void huart_timer_isr(void)
|
void huart_timer_isr(void)
|
||||||
{
|
{
|
||||||
huart_if_rx_ovflow();
|
huart_if_rx_ovflow();
|
||||||
|
@ -279,7 +279,7 @@ void huart_timer_isr(void)
|
||||||
uart1_irq_post();
|
uart1_irq_post();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
RT_SECTION(".irq.huart")
|
rt_section(".irq.huart")
|
||||||
void huart_timer_isr(void)
|
void huart_timer_isr(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
static struct rt_thread test1_thread;
|
static struct rt_thread test1_thread;
|
||||||
static rt_thread_t test2_thread = RT_NULL;
|
static rt_thread_t test2_thread = RT_NULL;
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t rt_test1_thread_stack[1024];
|
static rt_uint8_t rt_test1_thread_stack[1024];
|
||||||
static void test1_thread_entry(void* parameter);
|
static void test1_thread_entry(void* parameter);
|
||||||
static void test2_thread_entry(void* parameter);
|
static void test2_thread_entry(void* parameter);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
rt_uint8_t _fiq_stack_start[1024];
|
rt_uint8_t _fiq_stack_start[1024];
|
||||||
rt_uint8_t _undefined_stack_start[512];
|
rt_uint8_t _undefined_stack_start[512];
|
||||||
rt_uint8_t _abort_stack_start[512];
|
rt_uint8_t _abort_stack_start[512];
|
||||||
rt_uint8_t _svc_stack_start[1024] RT_SECTION(".nobss");
|
rt_uint8_t _svc_stack_start[1024] rt_section(".nobss");
|
||||||
extern unsigned char __bss_start;
|
extern unsigned char __bss_start;
|
||||||
extern unsigned char __bss_end;
|
extern unsigned char __bss_end;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -76,7 +76,7 @@ struct rt_pin_irq_hdr pin_irq_hdr_tab[] =
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_0
|
#ifdef ES_CONF_EXTI_IRQ_0
|
||||||
|
|
||||||
RT_WEAK void irq_pin0_callback(void* arg)
|
rt_weak void irq_pin0_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 0\r\n");
|
rt_kprintf("\r\nEXTI 0\r\n");
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ RT_WEAK void irq_pin0_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_1
|
#ifdef ES_CONF_EXTI_IRQ_1
|
||||||
|
|
||||||
RT_WEAK void irq_pin1_callback(void* arg)
|
rt_weak void irq_pin1_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 1\r\n");
|
rt_kprintf("\r\nEXTI 1\r\n");
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ RT_WEAK void irq_pin1_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_2
|
#ifdef ES_CONF_EXTI_IRQ_2
|
||||||
|
|
||||||
RT_WEAK void irq_pin2_callback(void* arg)
|
rt_weak void irq_pin2_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 2\r\n");
|
rt_kprintf("\r\nEXTI 2\r\n");
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ RT_WEAK void irq_pin1_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_3
|
#ifdef ES_CONF_EXTI_IRQ_3
|
||||||
|
|
||||||
RT_WEAK void irq_pin3_callback(void* arg)
|
rt_weak void irq_pin3_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 3\r\n");
|
rt_kprintf("\r\nEXTI 3\r\n");
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ RT_WEAK void irq_pin3_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_4
|
#ifdef ES_CONF_EXTI_IRQ_4
|
||||||
|
|
||||||
RT_WEAK void irq_pin4_callback(void* arg)
|
rt_weak void irq_pin4_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 4\r\n");
|
rt_kprintf("\r\nEXTI 4\r\n");
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ RT_WEAK void irq_pin4_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_5
|
#ifdef ES_CONF_EXTI_IRQ_5
|
||||||
|
|
||||||
RT_WEAK void irq_pin5_callback(void* arg)
|
rt_weak void irq_pin5_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 5\r\n");
|
rt_kprintf("\r\nEXTI 5\r\n");
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ RT_WEAK void irq_pin5_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_6
|
#ifdef ES_CONF_EXTI_IRQ_6
|
||||||
|
|
||||||
RT_WEAK void irq_pin6_callback(void* arg)
|
rt_weak void irq_pin6_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 6\r\n");
|
rt_kprintf("\r\nEXTI 6\r\n");
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ RT_WEAK void irq_pin6_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_7
|
#ifdef ES_CONF_EXTI_IRQ_7
|
||||||
|
|
||||||
RT_WEAK void irq_pin7_callback(void* arg)
|
rt_weak void irq_pin7_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 7\r\n");
|
rt_kprintf("\r\nEXTI 7\r\n");
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ RT_WEAK void irq_pin7_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_8
|
#ifdef ES_CONF_EXTI_IRQ_8
|
||||||
|
|
||||||
RT_WEAK void irq_pin8_callback(void* arg)
|
rt_weak void irq_pin8_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 8\r\n");
|
rt_kprintf("\r\nEXTI 8\r\n");
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ RT_WEAK void irq_pin8_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_9
|
#ifdef ES_CONF_EXTI_IRQ_9
|
||||||
|
|
||||||
RT_WEAK void irq_pin9_callback(void* arg)
|
rt_weak void irq_pin9_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 9\r\n");
|
rt_kprintf("\r\nEXTI 9\r\n");
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ RT_WEAK void irq_pin9_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_10
|
#ifdef ES_CONF_EXTI_IRQ_10
|
||||||
|
|
||||||
RT_WEAK void irq_pin10_callback(void* arg)
|
rt_weak void irq_pin10_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 10\r\n");
|
rt_kprintf("\r\nEXTI 10\r\n");
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ RT_WEAK void irq_pin10_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_11
|
#ifdef ES_CONF_EXTI_IRQ_11
|
||||||
|
|
||||||
RT_WEAK void irq_pin11_callback(void* arg)
|
rt_weak void irq_pin11_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 11\r\n");
|
rt_kprintf("\r\nEXTI 11\r\n");
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ RT_WEAK void irq_pin11_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_12
|
#ifdef ES_CONF_EXTI_IRQ_12
|
||||||
|
|
||||||
RT_WEAK void irq_pin12_callback(void* arg)
|
rt_weak void irq_pin12_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 12\r\n");
|
rt_kprintf("\r\nEXTI 12\r\n");
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ RT_WEAK void irq_pin12_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_13
|
#ifdef ES_CONF_EXTI_IRQ_13
|
||||||
|
|
||||||
RT_WEAK void irq_pin13_callback(void* arg)
|
rt_weak void irq_pin13_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 13\r\n");
|
rt_kprintf("\r\nEXTI 13\r\n");
|
||||||
}
|
}
|
||||||
|
@ -201,7 +201,7 @@ RT_WEAK void irq_pin13_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_14
|
#ifdef ES_CONF_EXTI_IRQ_14
|
||||||
|
|
||||||
RT_WEAK void irq_pin14_callback(void* arg)
|
rt_weak void irq_pin14_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 14\r\n");
|
rt_kprintf("\r\nEXTI 14\r\n");
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ RT_WEAK void irq_pin14_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_15
|
#ifdef ES_CONF_EXTI_IRQ_15
|
||||||
|
|
||||||
RT_WEAK void irq_pin15_callback(void* arg)
|
rt_weak void irq_pin15_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 15\r\n");
|
rt_kprintf("\r\nEXTI 15\r\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct rt_pin_irq_hdr pin_irq_hdr_tab[] =
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_0
|
#ifdef ES_CONF_EXTI_IRQ_0
|
||||||
|
|
||||||
RT_WEAK void irq_pin0_callback(void* arg)
|
rt_weak void irq_pin0_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 0\r\n");
|
rt_kprintf("\r\nEXTI 0\r\n");
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ RT_WEAK void irq_pin0_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_1
|
#ifdef ES_CONF_EXTI_IRQ_1
|
||||||
|
|
||||||
RT_WEAK void irq_pin1_callback(void* arg)
|
rt_weak void irq_pin1_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 1\r\n");
|
rt_kprintf("\r\nEXTI 1\r\n");
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ RT_WEAK void irq_pin1_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_2
|
#ifdef ES_CONF_EXTI_IRQ_2
|
||||||
|
|
||||||
RT_WEAK void irq_pin2_callback(void* arg)
|
rt_weak void irq_pin2_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 2\r\n");
|
rt_kprintf("\r\nEXTI 2\r\n");
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ RT_WEAK void irq_pin1_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_3
|
#ifdef ES_CONF_EXTI_IRQ_3
|
||||||
|
|
||||||
RT_WEAK void irq_pin3_callback(void* arg)
|
rt_weak void irq_pin3_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 3\r\n");
|
rt_kprintf("\r\nEXTI 3\r\n");
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ RT_WEAK void irq_pin3_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_4
|
#ifdef ES_CONF_EXTI_IRQ_4
|
||||||
|
|
||||||
RT_WEAK void irq_pin4_callback(void* arg)
|
rt_weak void irq_pin4_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 4\r\n");
|
rt_kprintf("\r\nEXTI 4\r\n");
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ RT_WEAK void irq_pin4_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_5
|
#ifdef ES_CONF_EXTI_IRQ_5
|
||||||
|
|
||||||
RT_WEAK void irq_pin5_callback(void* arg)
|
rt_weak void irq_pin5_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 5\r\n");
|
rt_kprintf("\r\nEXTI 5\r\n");
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ RT_WEAK void irq_pin5_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_6
|
#ifdef ES_CONF_EXTI_IRQ_6
|
||||||
|
|
||||||
RT_WEAK void irq_pin6_callback(void* arg)
|
rt_weak void irq_pin6_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 6\r\n");
|
rt_kprintf("\r\nEXTI 6\r\n");
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ RT_WEAK void irq_pin6_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_7
|
#ifdef ES_CONF_EXTI_IRQ_7
|
||||||
|
|
||||||
RT_WEAK void irq_pin7_callback(void* arg)
|
rt_weak void irq_pin7_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 7\r\n");
|
rt_kprintf("\r\nEXTI 7\r\n");
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ RT_WEAK void irq_pin7_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_8
|
#ifdef ES_CONF_EXTI_IRQ_8
|
||||||
|
|
||||||
RT_WEAK void irq_pin8_callback(void* arg)
|
rt_weak void irq_pin8_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 8\r\n");
|
rt_kprintf("\r\nEXTI 8\r\n");
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ RT_WEAK void irq_pin8_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_9
|
#ifdef ES_CONF_EXTI_IRQ_9
|
||||||
|
|
||||||
RT_WEAK void irq_pin9_callback(void* arg)
|
rt_weak void irq_pin9_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 9\r\n");
|
rt_kprintf("\r\nEXTI 9\r\n");
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ RT_WEAK void irq_pin9_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_10
|
#ifdef ES_CONF_EXTI_IRQ_10
|
||||||
|
|
||||||
RT_WEAK void irq_pin10_callback(void* arg)
|
rt_weak void irq_pin10_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 10\r\n");
|
rt_kprintf("\r\nEXTI 10\r\n");
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ RT_WEAK void irq_pin10_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_11
|
#ifdef ES_CONF_EXTI_IRQ_11
|
||||||
|
|
||||||
RT_WEAK void irq_pin11_callback(void* arg)
|
rt_weak void irq_pin11_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 11\r\n");
|
rt_kprintf("\r\nEXTI 11\r\n");
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ RT_WEAK void irq_pin11_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_12
|
#ifdef ES_CONF_EXTI_IRQ_12
|
||||||
|
|
||||||
RT_WEAK void irq_pin12_callback(void* arg)
|
rt_weak void irq_pin12_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 12\r\n");
|
rt_kprintf("\r\nEXTI 12\r\n");
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ RT_WEAK void irq_pin12_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_13
|
#ifdef ES_CONF_EXTI_IRQ_13
|
||||||
|
|
||||||
RT_WEAK void irq_pin13_callback(void* arg)
|
rt_weak void irq_pin13_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 13\r\n");
|
rt_kprintf("\r\nEXTI 13\r\n");
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ RT_WEAK void irq_pin13_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_14
|
#ifdef ES_CONF_EXTI_IRQ_14
|
||||||
|
|
||||||
RT_WEAK void irq_pin14_callback(void* arg)
|
rt_weak void irq_pin14_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 14\r\n");
|
rt_kprintf("\r\nEXTI 14\r\n");
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,7 @@ RT_WEAK void irq_pin14_callback(void* arg)
|
||||||
|
|
||||||
#ifdef ES_CONF_EXTI_IRQ_15
|
#ifdef ES_CONF_EXTI_IRQ_15
|
||||||
|
|
||||||
RT_WEAK void irq_pin15_callback(void* arg)
|
rt_weak void irq_pin15_callback(void* arg)
|
||||||
{
|
{
|
||||||
rt_kprintf("\r\nEXTI 15\r\n");
|
rt_kprintf("\r\nEXTI 15\r\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ void rt_hw_us_delay(rt_uint32_t us)
|
||||||
/**
|
/**
|
||||||
* This function will initial STM32 board.
|
* This function will initial STM32 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init()
|
rt_weak void rt_hw_board_init()
|
||||||
{
|
{
|
||||||
void SelRCHFToPLL(uint32_t rchf, uint32_t clock);
|
void SelRCHFToPLL(uint32_t rchf, uint32_t clock);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ float f_var2;
|
||||||
float f_var3;
|
float f_var3;
|
||||||
float f_var4;
|
float f_var4;
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static char thread_led1_stack[1024];
|
static char thread_led1_stack[1024];
|
||||||
struct rt_thread thread_led1;
|
struct rt_thread thread_led1;
|
||||||
static void rt_thread_entry_led1(void* parameter)
|
static void rt_thread_entry_led1(void* parameter)
|
||||||
|
|
|
@ -52,10 +52,10 @@ struct emac_device
|
||||||
/* inherit from Ethernet device */
|
/* inherit from Ethernet device */
|
||||||
struct eth_device parent;
|
struct eth_device parent;
|
||||||
|
|
||||||
ALIGN(64) enet_rx_bd_struct_t RxBuffDescrip[ENET_RX_RING_LEN];
|
rt_align(64) enet_rx_bd_struct_t RxBuffDescrip[ENET_RX_RING_LEN];
|
||||||
ALIGN(64) enet_tx_bd_struct_t TxBuffDescrip[ENET_TX_RING_LEN];
|
rt_align(64) enet_tx_bd_struct_t TxBuffDescrip[ENET_TX_RING_LEN];
|
||||||
ALIGN(64) uint8_t RxDataBuff[ENET_RX_RING_LEN * ENET_ALIGN(ENET_RXBUFF_SIZE)];
|
rt_align(64) uint8_t RxDataBuff[ENET_RX_RING_LEN * ENET_ALIGN(ENET_RXBUFF_SIZE)];
|
||||||
ALIGN(64) uint8_t TxDataBuff[ENET_TX_RING_LEN * ENET_ALIGN(ENET_TXBUFF_SIZE)];
|
rt_align(64) uint8_t TxDataBuff[ENET_TX_RING_LEN * ENET_ALIGN(ENET_TXBUFF_SIZE)];
|
||||||
|
|
||||||
enet_handle_t enet_handle;
|
enet_handle_t enet_handle;
|
||||||
rt_uint8_t dev_addr[MAX_ADDR_LEN]; /* MAC address */
|
rt_uint8_t dev_addr[MAX_ADDR_LEN]; /* MAC address */
|
||||||
|
|
|
@ -45,7 +45,7 @@ typedef struct
|
||||||
|
|
||||||
ft_sdctrl_class_t sdctrl_class;
|
ft_sdctrl_class_t sdctrl_class;
|
||||||
|
|
||||||
ALIGN(SDCTR_ALIGN_LEN)
|
rt_align(SDCTR_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDCTR_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDCTR_BUFF_SIZE];
|
||||||
|
|
||||||
static void rthw_sdctrl_send_command(ft_sdctrl_class_t *class_p, struct mmcsd_pkg *pkg);
|
static void rthw_sdctrl_send_command(ft_sdctrl_class_t *class_p, struct mmcsd_pkg *pkg);
|
||||||
|
|
|
@ -121,7 +121,7 @@ void rt_hw_us_delay(rt_uint32_t us)
|
||||||
/**
|
/**
|
||||||
* This function will initial FT32 board.
|
* This function will initial FT32 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init()
|
rt_weak void rt_hw_board_init()
|
||||||
{
|
{
|
||||||
SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND);
|
SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND);
|
||||||
/* Heap initialization */
|
/* Heap initialization */
|
||||||
|
|
|
@ -112,11 +112,11 @@ struct rt_imxrt_eth
|
||||||
};
|
};
|
||||||
|
|
||||||
AT_NONCACHEABLE_SECTION_ALIGN(static enet_tx_bd_struct_t g_txBuffDescrip[ENET_TXBD_NUM], ENET_BUFF_ALIGNMENT);
|
AT_NONCACHEABLE_SECTION_ALIGN(static enet_tx_bd_struct_t g_txBuffDescrip[ENET_TXBD_NUM], ENET_BUFF_ALIGNMENT);
|
||||||
ALIGN(ENET_BUFF_ALIGNMENT)
|
rt_align(ENET_BUFF_ALIGNMENT)
|
||||||
rt_uint8_t g_txDataBuff[ENET_TXBD_NUM][RT_ALIGN(ENET_TXBUFF_SIZE, ENET_BUFF_ALIGNMENT)];
|
rt_uint8_t g_txDataBuff[ENET_TXBD_NUM][RT_ALIGN(ENET_TXBUFF_SIZE, ENET_BUFF_ALIGNMENT)];
|
||||||
|
|
||||||
AT_NONCACHEABLE_SECTION_ALIGN(static enet_rx_bd_struct_t g_rxBuffDescrip[ENET_RXBD_NUM], ENET_BUFF_ALIGNMENT);
|
AT_NONCACHEABLE_SECTION_ALIGN(static enet_rx_bd_struct_t g_rxBuffDescrip[ENET_RXBD_NUM], ENET_BUFF_ALIGNMENT);
|
||||||
ALIGN(ENET_BUFF_ALIGNMENT)
|
rt_align(ENET_BUFF_ALIGNMENT)
|
||||||
rt_uint8_t g_rxDataBuff[ENET_RXBD_NUM][RT_ALIGN(ENET_RXBUFF_SIZE, ENET_BUFF_ALIGNMENT)];
|
rt_uint8_t g_rxDataBuff[ENET_RXBD_NUM][RT_ALIGN(ENET_RXBUFF_SIZE, ENET_BUFF_ALIGNMENT)];
|
||||||
|
|
||||||
static struct rt_imxrt_eth imxrt_eth_device;
|
static struct rt_imxrt_eth imxrt_eth_device;
|
||||||
|
|
|
@ -69,7 +69,7 @@ static int enable_log = 1;
|
||||||
#define USDHC_ADMA2_ADDR_ALIGN (4U) /* define the ADMA2 descriptor table addr align size */
|
#define USDHC_ADMA2_ADDR_ALIGN (4U) /* define the ADMA2 descriptor table addr align size */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//ALIGN(USDHC_ADMA2_ADDR_ALIGN) uint32_t g_usdhcAdma2Table[USDHC_ADMA_TABLE_WORDS] SECTION("NonCacheable");
|
//rt_align(USDHC_ADMA2_ADDR_ALIGN) uint32_t g_usdhcAdma2Table[USDHC_ADMA_TABLE_WORDS] SECTION("NonCacheable");
|
||||||
AT_NONCACHEABLE_SECTION_ALIGN(uint32_t g_usdhcAdma2Table[USDHC_ADMA_TABLE_WORDS], USDHC_ADMA2_ADDR_ALIGN);
|
AT_NONCACHEABLE_SECTION_ALIGN(uint32_t g_usdhcAdma2Table[USDHC_ADMA_TABLE_WORDS], USDHC_ADMA2_ADDR_ALIGN);
|
||||||
struct imxrt_mmcsd
|
struct imxrt_mmcsd
|
||||||
{
|
{
|
||||||
|
|
|
@ -446,7 +446,7 @@ static void uart_irq_handler(int irqno, void *param)
|
||||||
|
|
||||||
/* WEAK for SDK 0.5.6 */
|
/* WEAK for SDK 0.5.6 */
|
||||||
|
|
||||||
RT_WEAK void uart_debug_init(uart_device_number_t uart_channel)
|
rt_weak void uart_debug_init(uart_device_number_t uart_channel)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ struct vga_struct vga_mode[] =
|
||||||
{/*"1440x900_67.00"*/ 120280, 1440, 1528, 1680, 1920, 900, 901, 904, 935, },
|
{/*"1440x900_67.00"*/ 120280, 1440, 1528, 1680, 1920, 900, 901, 904, 935, },
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(16)
|
rt_align(16)
|
||||||
volatile rt_uint16_t _rt_framebuffer[FB_YSIZE][FB_XSIZE];
|
volatile rt_uint16_t _rt_framebuffer[FB_YSIZE][FB_XSIZE];
|
||||||
static struct rt_device_graphic_info _dc_info;
|
static struct rt_device_graphic_info _dc_info;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ struct vga_struct vga_mode[] =
|
||||||
|
|
||||||
static volatile int fb_index = 0;
|
static volatile int fb_index = 0;
|
||||||
|
|
||||||
ALIGN(16)
|
rt_align(16)
|
||||||
volatile rt_uint16_t _rt_framebuffer[FB_YSIZE][FB_XSIZE];
|
volatile rt_uint16_t _rt_framebuffer[FB_YSIZE][FB_XSIZE];
|
||||||
volatile rt_uint16_t _rt_framebuffer0[FB_YSIZE][FB_XSIZE];
|
volatile rt_uint16_t _rt_framebuffer0[FB_YSIZE][FB_XSIZE];
|
||||||
volatile rt_uint16_t _rt_framebuffer1[FB_YSIZE][FB_XSIZE];
|
volatile rt_uint16_t _rt_framebuffer1[FB_YSIZE][FB_XSIZE];
|
||||||
|
|
|
@ -112,7 +112,7 @@ void rt_init_thread_entry(void *parameter)
|
||||||
// trun off led n
|
// trun off led n
|
||||||
#define rt_hw_led_off(n) LPC_GPIO2->SET |= 1<<25;
|
#define rt_hw_led_off(n) LPC_GPIO2->SET |= 1<<25;
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static char thread_led_stack[1024];
|
static char thread_led_stack[1024];
|
||||||
struct rt_thread thread_led;
|
struct rt_thread thread_led;
|
||||||
static void rt_thread_entry_led(void* parameter)
|
static void rt_thread_entry_led(void* parameter)
|
||||||
|
|
|
@ -96,7 +96,7 @@ void rt_init_thread_entry(void *parameter)
|
||||||
#define LED3 (1<<18) //P1
|
#define LED3 (1<<18) //P1
|
||||||
#define LED4 (1<<19) //P1
|
#define LED4 (1<<19) //P1
|
||||||
|
|
||||||
ALIGN(4) char thread_led1_stack[512];
|
rt_align(4) char thread_led1_stack[512];
|
||||||
struct rt_thread thread_led1;
|
struct rt_thread thread_led1;
|
||||||
void thread_led1_entry(void *parameter)
|
void thread_led1_entry(void *parameter)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ void thread_led1_entry(void *parameter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ALIGN(4) char thread_led2_stack[512];
|
rt_align(4) char thread_led2_stack[512];
|
||||||
struct rt_thread thread_led2;
|
struct rt_thread thread_led2;
|
||||||
void thread_led2_entry(void *parameter)
|
void thread_led2_entry(void *parameter)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,7 +39,7 @@ void rt_init_thread_entry(void *parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*the led thread*/
|
/*the led thread*/
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t led_stack[1024];
|
static rt_uint8_t led_stack[1024];
|
||||||
static struct rt_thread led_thread;
|
static struct rt_thread led_thread;
|
||||||
static void led_thread_entry(void *parameter)
|
static void led_thread_entry(void *parameter)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <vbus.h>
|
#include <vbus.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
|
||||||
struct rt_vbus_ring rt_vbus_rings[2] RT_SECTION("vbus_ring");
|
struct rt_vbus_ring rt_vbus_rings[2] rt_section("vbus_ring");
|
||||||
|
|
||||||
int rt_vbus_do_init(void)
|
int rt_vbus_do_init(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <vbus.h>
|
#include <vbus.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const unsigned char _M0_CODE[] RT_SECTION("M0_CODE") = {
|
static const unsigned char _M0_CODE[] rt_section("M0_CODE") = {
|
||||||
#include "M0_CODE.h"
|
#include "M0_CODE.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ void rt_init_thread_entry(void *parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*the led thread*/
|
/*the led thread*/
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t led_stack[ 512 ];
|
static rt_uint8_t led_stack[ 512 ];
|
||||||
static struct rt_thread led_thread;
|
static struct rt_thread led_thread;
|
||||||
static void led_thread_entry(void *parameter)
|
static void led_thread_entry(void *parameter)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#include <vbus.h>
|
#include <vbus.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
|
||||||
struct rt_vbus_ring rt_vbus_rings[2] RT_SECTION("vbus_ring");
|
struct rt_vbus_ring rt_vbus_rings[2] rt_section("vbus_ring");
|
||||||
|
|
||||||
int rt_vbus_do_init(void)
|
int rt_vbus_do_init(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#define EMAC_PHY_100MBIT 2
|
#define EMAC_PHY_100MBIT 2
|
||||||
|
|
||||||
#define MAX_ADDR_LEN 6
|
#define MAX_ADDR_LEN 6
|
||||||
static rt_uint32_t ETH_RAM_BASE[4 * 1024] RT_SECTION("ETH_RAM");
|
static rt_uint32_t ETH_RAM_BASE[4 * 1024] rt_section("ETH_RAM");
|
||||||
|
|
||||||
/* EMAC variables located in 16K Ethernet SRAM */
|
/* EMAC variables located in 16K Ethernet SRAM */
|
||||||
#define RX_DESC_BASE (uint32_t)Ð_RAM_BASE[0]
|
#define RX_DESC_BASE (uint32_t)Ð_RAM_BASE[0]
|
||||||
|
|
|
@ -19,11 +19,11 @@
|
||||||
|
|
||||||
#ifndef RT_USING_HEAP
|
#ifndef RT_USING_HEAP
|
||||||
/* if there is not enable heap, we should use static thread and stack. */
|
/* if there is not enable heap, we should use static thread and stack. */
|
||||||
ALIGN(8)
|
rt_align(8)
|
||||||
static rt_uint8_t init_stack[INIT_STACK_SIZE];
|
static rt_uint8_t init_stack[INIT_STACK_SIZE];
|
||||||
static struct rt_thread init_thread;
|
static struct rt_thread init_thread;
|
||||||
|
|
||||||
ALIGN(8)
|
rt_align(8)
|
||||||
static rt_uint8_t led_stack[LED_STACK_SIZE];
|
static rt_uint8_t led_stack[LED_STACK_SIZE];
|
||||||
static struct rt_thread led_thread;
|
static struct rt_thread led_thread;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
static struct rt_thread led;
|
static struct rt_thread led;
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t led_stack[256];
|
static rt_uint8_t led_stack[256];
|
||||||
|
|
||||||
static void rt_thread_entry_led(void *parameter)
|
static void rt_thread_entry_led(void *parameter)
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
rt_uint8_t _fiq_stack_start[1024];
|
rt_uint8_t _fiq_stack_start[1024];
|
||||||
rt_uint8_t _undefined_stack_start[512];
|
rt_uint8_t _undefined_stack_start[512];
|
||||||
rt_uint8_t _abort_stack_start[512];
|
rt_uint8_t _abort_stack_start[512];
|
||||||
rt_uint8_t _svc_stack_start[4096] RT_SECTION(".nobss");
|
rt_uint8_t _svc_stack_start[4096] rt_section(".nobss");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__CC_ARM)
|
#if defined(__CC_ARM)
|
||||||
|
|
|
@ -121,7 +121,7 @@ void rt_hw_us_delay(rt_uint32_t us)
|
||||||
/**
|
/**
|
||||||
* This function will initial STM32 board.
|
* This function will initial STM32 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init()
|
rt_weak void rt_hw_board_init()
|
||||||
{
|
{
|
||||||
#ifdef BSP_SCB_ENABLE_I_CACHE
|
#ifdef BSP_SCB_ENABLE_I_CACHE
|
||||||
/* Enable I-Cache---------------------------------------------------------*/
|
/* Enable I-Cache---------------------------------------------------------*/
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
LED_BASE,\
|
LED_BASE,\
|
||||||
IORD_ALTERA_AVALON_PIO_DATA(LED_BASE) & ~(1<<n) )
|
IORD_ALTERA_AVALON_PIO_DATA(LED_BASE) & ~(1<<n) )
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static char thread_led1_stack[1024];
|
static char thread_led1_stack[1024];
|
||||||
struct rt_thread thread_led1;
|
struct rt_thread thread_led1;
|
||||||
static void rt_thread_entry_led1(void* parameter)
|
static void rt_thread_entry_led1(void* parameter)
|
||||||
|
@ -56,7 +56,7 @@ static void rt_thread_entry_led1(void* parameter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static char thread_led2_stack[1024];
|
static char thread_led2_stack[1024];
|
||||||
struct rt_thread thread_led2;
|
struct rt_thread thread_led2;
|
||||||
void rt_thread_entry_led2(void* parameter)
|
void rt_thread_entry_led2(void* parameter)
|
||||||
|
|
|
@ -166,7 +166,7 @@ static rt_err_t _uart_ctrl(struct rt_serial_device *serial, int cmd, void *arg)
|
||||||
|
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
RT_WEAK int uart_putc_hook(rt_uint8_t *ch)
|
rt_weak int uart_putc_hook(rt_uint8_t *ch)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,7 @@ static int _uart_putc(struct rt_serial_device *serial, char c)
|
||||||
return rtn;
|
return rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK int uart_getc_hook(rt_uint8_t *ch)
|
rt_weak int uart_getc_hook(rt_uint8_t *ch)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
/**
|
/**
|
||||||
* This function will initial M032 board.
|
* This function will initial M032 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init(void)
|
rt_weak void rt_hw_board_init(void)
|
||||||
{
|
{
|
||||||
/* Init System/modules clock */
|
/* Init System/modules clock */
|
||||||
nutool_modclkcfg_init();
|
nutool_modclkcfg_init();
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
/**
|
/**
|
||||||
* This function will initial M487 board.
|
* This function will initial M487 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init(void)
|
rt_weak void rt_hw_board_init(void)
|
||||||
{
|
{
|
||||||
/* Init System/modules clock */
|
/* Init System/modules clock */
|
||||||
nutool_modclkcfg_init();
|
nutool_modclkcfg_init();
|
||||||
|
|
|
@ -29,7 +29,7 @@ extern void nutool_pincfg_init(void);
|
||||||
/**
|
/**
|
||||||
* This function will initial.
|
* This function will initial.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init(void)
|
rt_weak void rt_hw_board_init(void)
|
||||||
{
|
{
|
||||||
uint32_t u32RegLockBackup = SYS_IsRegLocked();
|
uint32_t u32RegLockBackup = SYS_IsRegLocked();
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
/**
|
/**
|
||||||
* This function will initial.
|
* This function will initial.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init(void)
|
rt_weak void rt_hw_board_init(void)
|
||||||
{
|
{
|
||||||
/* Init System/modules clock */
|
/* Init System/modules clock */
|
||||||
nutool_modclkcfg_init();
|
nutool_modclkcfg_init();
|
||||||
|
|
|
@ -301,7 +301,7 @@ void idle_wfi(void)
|
||||||
extern void nu_clock_dump(void);
|
extern void nu_clock_dump(void);
|
||||||
extern void nu_clock_raise(void);
|
extern void nu_clock_raise(void);
|
||||||
|
|
||||||
RT_WEAK void nutool_pincfg_init(void)
|
rt_weak void nutool_pincfg_init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -309,7 +309,7 @@ RT_WEAK void nutool_pincfg_init(void)
|
||||||
/**
|
/**
|
||||||
* This function will initial board.
|
* This function will initial board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init(void)
|
rt_weak void rt_hw_board_init(void)
|
||||||
{
|
{
|
||||||
/* Unlock protected registers */
|
/* Unlock protected registers */
|
||||||
SYS_UnlockReg();
|
SYS_UnlockReg();
|
||||||
|
|
|
@ -69,9 +69,9 @@ static struct nu_disp nu_fbdev[eLayer_Cnt] =
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
RT_WEAK void nu_lcd_backlight_on(void) { }
|
rt_weak void nu_lcd_backlight_on(void) { }
|
||||||
|
|
||||||
RT_WEAK void nu_lcd_backlight_off(void) { }
|
rt_weak void nu_lcd_backlight_off(void) { }
|
||||||
|
|
||||||
static void nu_disp_isr(int vector, void *param)
|
static void nu_disp_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,7 +106,7 @@ exit_nu_rtp_load_from_memory:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RT_WEAK void nu_rtp_sspcc_setup(void)
|
rt_weak void nu_rtp_sspcc_setup(void)
|
||||||
{
|
{
|
||||||
SSPCC_SET_REALM(SSPCC_UART16, SSPCC_SSET_SUBM);
|
SSPCC_SET_REALM(SSPCC_UART16, SSPCC_SSET_SUBM);
|
||||||
|
|
||||||
|
|
|
@ -59,12 +59,12 @@ typedef struct nu_sdh *nu_sdh_t;
|
||||||
|
|
||||||
/* Private variables ------------------------------------------------------------*/
|
/* Private variables ------------------------------------------------------------*/
|
||||||
#if defined(BSP_USING_SDH0)
|
#if defined(BSP_USING_SDH0)
|
||||||
ALIGN(SDH_ALIGN_LEN)
|
rt_align(SDH_ALIGN_LEN)
|
||||||
static uint8_t g_au8CacheBuf_SDH0[SDH_BUFF_SIZE];
|
static uint8_t g_au8CacheBuf_SDH0[SDH_BUFF_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(BSP_USING_SDH1)
|
#if defined(BSP_USING_SDH1)
|
||||||
ALIGN(SDH_ALIGN_LEN)
|
rt_align(SDH_ALIGN_LEN)
|
||||||
static uint8_t g_au8CacheBuf_SDH1[SDH_BUFF_SIZE];
|
static uint8_t g_au8CacheBuf_SDH1[SDH_BUFF_SIZE];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ static struct mem_desc hw_mem_desc[] =
|
||||||
/**
|
/**
|
||||||
* This function will initial M487 board.
|
* This function will initial M487 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init(void)
|
rt_weak void rt_hw_board_init(void)
|
||||||
{
|
{
|
||||||
/* initialize base clock */
|
/* initialize base clock */
|
||||||
nu_clock_base_init();
|
nu_clock_base_init();
|
||||||
|
|
|
@ -70,9 +70,9 @@ static struct nu_vpost nu_fbdev[eVpost_Cnt] =
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
RT_WEAK void nu_lcd_backlight_on(void) { }
|
rt_weak void nu_lcd_backlight_on(void) { }
|
||||||
|
|
||||||
RT_WEAK void nu_lcd_backlight_off(void) { }
|
rt_weak void nu_lcd_backlight_off(void) { }
|
||||||
static rt_err_t vpost_layer_open(rt_device_t dev, rt_uint16_t oflag)
|
static rt_err_t vpost_layer_open(rt_device_t dev, rt_uint16_t oflag)
|
||||||
{
|
{
|
||||||
nu_vpost_t psVpost = (nu_vpost_t)dev;
|
nu_vpost_t psVpost = (nu_vpost_t)dev;
|
||||||
|
|
|
@ -44,7 +44,7 @@ typedef nu_adc_touch *nu_adc_touch_t;
|
||||||
static nu_adc_touch s_NuAdcTouch = {0};
|
static nu_adc_touch s_NuAdcTouch = {0};
|
||||||
|
|
||||||
/* User can define ADC touch calibration matrix in board_dev.c. */
|
/* User can define ADC touch calibration matrix in board_dev.c. */
|
||||||
RT_WEAK S_CALIBRATION_MATRIX g_sCalMat = { 1, 0, 0, 0, 1, 0, 1 };
|
rt_weak S_CALIBRATION_MATRIX g_sCalMat = { 1, 0, 0, 0, 1, 0, 1 };
|
||||||
static volatile uint32_t g_u32Calibrated = 0;
|
static volatile uint32_t g_u32Calibrated = 0;
|
||||||
|
|
||||||
static int nu_adc_touch_readfile(void);
|
static int nu_adc_touch_readfile(void);
|
||||||
|
@ -327,7 +327,7 @@ static rt_err_t adc_request_point(rt_device_t pdev, struct rt_touch_data *psTouc
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void nu_touch_inputevent_cb(rt_int16_t x, rt_int16_t y, rt_uint8_t event)
|
rt_weak void nu_touch_inputevent_cb(rt_int16_t x, rt_int16_t y, rt_uint8_t event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#include <rtdbg.h>
|
#include <rtdbg.h>
|
||||||
|
|
||||||
static struct rt_thread usb_thread;
|
static struct rt_thread usb_thread;
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static char usb_thread_stack[1024];
|
static char usb_thread_stack[1024];
|
||||||
static struct rt_semaphore tx_sem_complete;
|
static struct rt_semaphore tx_sem_complete;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
static rt_sem_t tpc_sem = RT_NULL;
|
static rt_sem_t tpc_sem = RT_NULL;
|
||||||
|
|
||||||
RT_WEAK void nu_touch_inputevent_cb(rt_int16_t x, rt_int16_t y, rt_uint8_t state)
|
rt_weak void nu_touch_inputevent_cb(rt_int16_t x, rt_int16_t y, rt_uint8_t state)
|
||||||
{
|
{
|
||||||
rt_kprintf("[%d] %d %d\n", state, x, y);
|
rt_kprintf("[%d] %d %d\n", state, x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
static rt_sem_t tpc_sem = RT_NULL;
|
static rt_sem_t tpc_sem = RT_NULL;
|
||||||
|
|
||||||
RT_WEAK void nu_touch_inputevent_cb(rt_int16_t x, rt_int16_t y, rt_uint8_t state)
|
rt_weak void nu_touch_inputevent_cb(rt_int16_t x, rt_int16_t y, rt_uint8_t state)
|
||||||
{
|
{
|
||||||
rt_kprintf("[%d] %d %d\n", state, x, y);
|
rt_kprintf("[%d] %d %d\n", state, x, y);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ static struct mem_desc hw_mem_desc[] =
|
||||||
/**
|
/**
|
||||||
* This function will initial M487 board.
|
* This function will initial M487 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init(void)
|
rt_weak void rt_hw_board_init(void)
|
||||||
{
|
{
|
||||||
/* initialize base clock */
|
/* initialize base clock */
|
||||||
nu_clock_base_init();
|
nu_clock_base_init();
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <plib.h>
|
#include <plib.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
int thread_led1_stack[512];
|
int thread_led1_stack[512];
|
||||||
struct rt_thread thread_led1;
|
struct rt_thread thread_led1;
|
||||||
void thread_led1_entry(void* parameter)
|
void thread_led1_entry(void* parameter)
|
||||||
|
|
|
@ -24,7 +24,7 @@ static rt_uint32_t cur_points[2];
|
||||||
static rt_uint32_t cur_last_points[2];
|
static rt_uint32_t cur_last_points[2];
|
||||||
static rt_bool_t cur_event_sync;
|
static rt_bool_t cur_event_sync;
|
||||||
static rt_uint32_t color[2] = { 0xff0000, 0x0000ff };
|
static rt_uint32_t color[2] = { 0xff0000, 0x0000ff };
|
||||||
static rt_uint8_t cursor[VIRTIO_GPU_CURSOR_IMG_SIZE] ALIGN(VIRTIO_PAGE_SIZE);
|
static rt_uint8_t cursor[VIRTIO_GPU_CURSOR_IMG_SIZE] rt_align(VIRTIO_PAGE_SIZE);
|
||||||
|
|
||||||
void tablet_event_handler(struct virtio_input_event event)
|
void tablet_event_handler(struct virtio_input_event event)
|
||||||
{
|
{
|
||||||
|
|
|
@ -161,6 +161,6 @@ int rt_hw_uart_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* WEAK for SDK 0.5.6 */
|
/* WEAK for SDK 0.5.6 */
|
||||||
RT_WEAK void uart_debug_init(int uart_channel)
|
rt_weak void uart_debug_init(int uart_channel)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ void rt_hw_us_delay(rt_uint32_t us)
|
||||||
/**
|
/**
|
||||||
* This function will initial STM32 board.
|
* This function will initial STM32 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init()
|
rt_weak void rt_hw_board_init()
|
||||||
{
|
{
|
||||||
|
|
||||||
rt_hw_systick_init();
|
rt_hw_systick_init();
|
||||||
|
|
|
@ -24,7 +24,7 @@ struct rthw_sdio
|
||||||
|
|
||||||
static struct rt_mmcsd_host *host;
|
static struct rt_mmcsd_host *host;
|
||||||
|
|
||||||
ALIGN(SDIO_ALIGN_LEN)
|
rt_align(SDIO_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
||||||
|
|
||||||
rt_err_t command_send(sdhi_instance_ctrl_t *p_ctrl, struct rt_mmcsd_cmd *cmd)
|
rt_err_t command_send(sdhi_instance_ctrl_t *p_ctrl, struct rt_mmcsd_cmd *cmd)
|
||||||
|
|
|
@ -248,37 +248,37 @@ int rt_hw_cpu_cache_init(void)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
RT_WEAK void rt_hw_cpu_icache_enable(void)
|
rt_weak void rt_hw_cpu_icache_enable(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void rt_hw_cpu_icache_disable(void)
|
rt_weak void rt_hw_cpu_icache_disable(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK rt_base_t rt_hw_cpu_icache_status(void)
|
rt_weak rt_base_t rt_hw_cpu_icache_status(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void rt_hw_cpu_icache_ops(int ops, void *addr, int size)
|
rt_weak void rt_hw_cpu_icache_ops(int ops, void *addr, int size)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void rt_hw_cpu_dcache_enable(void)
|
rt_weak void rt_hw_cpu_dcache_enable(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void rt_hw_cpu_dcache_disable(void)
|
rt_weak void rt_hw_cpu_dcache_disable(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK rt_base_t rt_hw_cpu_dcache_status(void)
|
rt_weak rt_base_t rt_hw_cpu_dcache_status(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void rt_hw_cpu_dcache_ops(int ops, void *addr, int size)
|
rt_weak void rt_hw_cpu_dcache_ops(int ops, void *addr, int size)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_CRU
|
#ifdef RT_USING_CRU
|
||||||
RT_WEAK const struct clk_init clk_inits[] =
|
rt_weak const struct clk_init clk_inits[] =
|
||||||
{
|
{
|
||||||
INIT_CLK("SCLK_SHRM", SCLK_SHRM, 10 * MHZ),
|
INIT_CLK("SCLK_SHRM", SCLK_SHRM, 10 * MHZ),
|
||||||
INIT_CLK("PCLK_SHRM", PCLK_SHRM, 10 * MHZ),
|
INIT_CLK("PCLK_SHRM", PCLK_SHRM, 10 * MHZ),
|
||||||
|
@ -63,7 +63,7 @@ RT_WEAK const struct clk_init clk_inits[] =
|
||||||
{ /* sentinel */ },
|
{ /* sentinel */ },
|
||||||
};
|
};
|
||||||
|
|
||||||
RT_WEAK const struct clk_unused clks_unused[] =
|
rt_weak const struct clk_unused clks_unused[] =
|
||||||
{
|
{
|
||||||
{0, 0, 0x00030003},
|
{0, 0, 0x00030003},
|
||||||
{0, 5, 0x00ee00ee},
|
{0, 5, 0x00ee00ee},
|
||||||
|
@ -78,7 +78,7 @@ RT_WEAK const struct clk_unused clks_unused[] =
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(RT_USING_UART0)
|
#if defined(RT_USING_UART0)
|
||||||
RT_WEAK const struct uart_board g_uart0_board =
|
rt_weak const struct uart_board g_uart0_board =
|
||||||
{
|
{
|
||||||
.baud_rate = ROCKCHIP_UART_BAUD_RATE_DEFAULT,
|
.baud_rate = ROCKCHIP_UART_BAUD_RATE_DEFAULT,
|
||||||
.dev_flag = ROCKCHIP_UART_SUPPORT_FLAG_DEFAULT,
|
.dev_flag = ROCKCHIP_UART_SUPPORT_FLAG_DEFAULT,
|
||||||
|
@ -88,7 +88,7 @@ RT_WEAK const struct uart_board g_uart0_board =
|
||||||
#endif /* RT_USING_UART0 */
|
#endif /* RT_USING_UART0 */
|
||||||
|
|
||||||
#if defined(RT_USING_UART1)
|
#if defined(RT_USING_UART1)
|
||||||
RT_WEAK const struct uart_board g_uart1_board =
|
rt_weak const struct uart_board g_uart1_board =
|
||||||
{
|
{
|
||||||
.baud_rate = ROCKCHIP_UART_BAUD_RATE_DEFAULT,
|
.baud_rate = ROCKCHIP_UART_BAUD_RATE_DEFAULT,
|
||||||
.dev_flag = ROCKCHIP_UART_SUPPORT_FLAG_DEFAULT,
|
.dev_flag = ROCKCHIP_UART_SUPPORT_FLAG_DEFAULT,
|
||||||
|
@ -98,7 +98,7 @@ RT_WEAK const struct uart_board g_uart1_board =
|
||||||
#endif /* RT_USING_UART1 */
|
#endif /* RT_USING_UART1 */
|
||||||
|
|
||||||
#if defined(RT_USING_UART2)
|
#if defined(RT_USING_UART2)
|
||||||
RT_WEAK const struct uart_board g_uart2_board =
|
rt_weak const struct uart_board g_uart2_board =
|
||||||
{
|
{
|
||||||
.baud_rate = ROCKCHIP_UART_BAUD_RATE_DEFAULT,
|
.baud_rate = ROCKCHIP_UART_BAUD_RATE_DEFAULT,
|
||||||
.dev_flag = ROCKCHIP_UART_SUPPORT_FLAG_DEFAULT,
|
.dev_flag = ROCKCHIP_UART_SUPPORT_FLAG_DEFAULT,
|
||||||
|
@ -108,7 +108,7 @@ RT_WEAK const struct uart_board g_uart2_board =
|
||||||
#endif /* RT_USING_UART2 */
|
#endif /* RT_USING_UART2 */
|
||||||
|
|
||||||
extern void SysTick_Handler(void);
|
extern void SysTick_Handler(void);
|
||||||
RT_WEAK void tick_isr(int vector, void *param)
|
rt_weak void tick_isr(int vector, void *param)
|
||||||
{
|
{
|
||||||
/* enter interrupt */
|
/* enter interrupt */
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
/**
|
/**
|
||||||
* @brief Config iomux for M4 JTAG
|
* @brief Config iomux for M4 JTAG
|
||||||
*/
|
*/
|
||||||
RT_WEAK void m4_jtag_iomux_config(void)
|
rt_weak void m4_jtag_iomux_config(void)
|
||||||
{
|
{
|
||||||
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
||||||
GPIO_PIN_C7 | // M4_JTAG_TCK
|
GPIO_PIN_C7 | // M4_JTAG_TCK
|
||||||
|
@ -26,7 +26,7 @@ RT_WEAK void m4_jtag_iomux_config(void)
|
||||||
/**
|
/**
|
||||||
* @brief Config iomux for UART0
|
* @brief Config iomux for UART0
|
||||||
*/
|
*/
|
||||||
RT_WEAK void uart0_iomux_config(void)
|
rt_weak void uart0_iomux_config(void)
|
||||||
{
|
{
|
||||||
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
||||||
GPIO_PIN_C7 | // UART0_RX
|
GPIO_PIN_C7 | // UART0_RX
|
||||||
|
@ -37,7 +37,7 @@ RT_WEAK void uart0_iomux_config(void)
|
||||||
/**
|
/**
|
||||||
* @brief Config iomux for UART1
|
* @brief Config iomux for UART1
|
||||||
*/
|
*/
|
||||||
RT_WEAK void uart1_m0_iomux_config(void)
|
rt_weak void uart1_m0_iomux_config(void)
|
||||||
{
|
{
|
||||||
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
||||||
GPIO_PIN_D1 | // UART1_RX_M0
|
GPIO_PIN_D1 | // UART1_RX_M0
|
||||||
|
@ -49,7 +49,7 @@ RT_WEAK void uart1_m0_iomux_config(void)
|
||||||
(0 << GRF_SOC_CON5_GRF_CON_UART1_IOMUX_SEL_SHIFT));
|
(0 << GRF_SOC_CON5_GRF_CON_UART1_IOMUX_SEL_SHIFT));
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void uart1_m1_iomux_config(void)
|
rt_weak void uart1_m1_iomux_config(void)
|
||||||
{
|
{
|
||||||
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
||||||
GPIO_PIN_A5 | // UART1_RX_M1
|
GPIO_PIN_A5 | // UART1_RX_M1
|
||||||
|
@ -61,7 +61,7 @@ RT_WEAK void uart1_m1_iomux_config(void)
|
||||||
(1 << GRF_SOC_CON5_GRF_CON_UART1_IOMUX_SEL_SHIFT));
|
(1 << GRF_SOC_CON5_GRF_CON_UART1_IOMUX_SEL_SHIFT));
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void uart1_m2_iomux_config(void)
|
rt_weak void uart1_m2_iomux_config(void)
|
||||||
{
|
{
|
||||||
HAL_PINCTRL_SetIOMUX(GPIO_BANK1,
|
HAL_PINCTRL_SetIOMUX(GPIO_BANK1,
|
||||||
GPIO_PIN_B1 | // UART1_RX_M2
|
GPIO_PIN_B1 | // UART1_RX_M2
|
||||||
|
@ -73,7 +73,7 @@ RT_WEAK void uart1_m2_iomux_config(void)
|
||||||
(2 << GRF_SOC_CON5_GRF_CON_UART1_IOMUX_SEL_SHIFT));
|
(2 << GRF_SOC_CON5_GRF_CON_UART1_IOMUX_SEL_SHIFT));
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void uart1_m3_iomux_config(void)
|
rt_weak void uart1_m3_iomux_config(void)
|
||||||
{
|
{
|
||||||
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
HAL_PINCTRL_SetIOMUX(GPIO_BANK0,
|
||||||
GPIO_PIN_A5, // UART1_RX_M3
|
GPIO_PIN_A5, // UART1_RX_M3
|
||||||
|
@ -91,7 +91,7 @@ RT_WEAK void uart1_m3_iomux_config(void)
|
||||||
/**
|
/**
|
||||||
* @brief Config iomux for UART2
|
* @brief Config iomux for UART2
|
||||||
*/
|
*/
|
||||||
RT_WEAK void uart2_iomux_config(void)
|
rt_weak void uart2_iomux_config(void)
|
||||||
{
|
{
|
||||||
HAL_PINCTRL_SetIOMUX(GPIO_BANK1,
|
HAL_PINCTRL_SetIOMUX(GPIO_BANK1,
|
||||||
GPIO_PIN_A0 | // UART2_RX
|
GPIO_PIN_A0 | // UART2_RX
|
||||||
|
@ -104,7 +104,7 @@ RT_WEAK void uart2_iomux_config(void)
|
||||||
/**
|
/**
|
||||||
* @brief Config iomux for RK2108
|
* @brief Config iomux for RK2108
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_iomux_config(void)
|
rt_weak void rt_hw_iomux_config(void)
|
||||||
{
|
{
|
||||||
uart2_iomux_config();
|
uart2_iomux_config();
|
||||||
|
|
||||||
|
|
|
@ -172,7 +172,7 @@ void rt_init_thread_entry(void* parameter)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t led_stack[ 512 ];
|
static rt_uint8_t led_stack[ 512 ];
|
||||||
static struct rt_thread led_thread;
|
static struct rt_thread led_thread;
|
||||||
static void led_thread_entry(void* parameter)
|
static void led_thread_entry(void* parameter)
|
||||||
|
|
|
@ -28,7 +28,7 @@ rt_uint8_t _irq_stack_start[1024];
|
||||||
rt_uint8_t _fiq_stack_start[1024];
|
rt_uint8_t _fiq_stack_start[1024];
|
||||||
rt_uint8_t _undefined_stack_start[512];
|
rt_uint8_t _undefined_stack_start[512];
|
||||||
rt_uint8_t _abort_stack_start[512];
|
rt_uint8_t _abort_stack_start[512];
|
||||||
rt_uint8_t _priv_stack_start[4096]; RT_SECTION(".nobss");
|
rt_uint8_t _priv_stack_start[4096]; rt_section(".nobss");
|
||||||
extern unsigned char __bss_start;
|
extern unsigned char __bss_start;
|
||||||
extern unsigned char __bss_end;
|
extern unsigned char __bss_end;
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,12 @@ static uint32_t _SysTick_Config(rt_uint32_t ticks)
|
||||||
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
||||||
#define RT_HEAP_SIZE 1024
|
#define RT_HEAP_SIZE 1024
|
||||||
static uint32_t rt_heap[RT_HEAP_SIZE]; // heap default size: 4K(1024 * 4)
|
static uint32_t rt_heap[RT_HEAP_SIZE]; // heap default size: 4K(1024 * 4)
|
||||||
RT_WEAK void *rt_heap_begin_get(void)
|
rt_weak void *rt_heap_begin_get(void)
|
||||||
{
|
{
|
||||||
return rt_heap;
|
return rt_heap;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void *rt_heap_end_get(void)
|
rt_weak void *rt_heap_end_get(void)
|
||||||
{
|
{
|
||||||
return rt_heap + RT_HEAP_SIZE;
|
return rt_heap + RT_HEAP_SIZE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@ void rt_hw_us_delay(rt_uint32_t us)
|
||||||
/**
|
/**
|
||||||
* This function will initial STM32 board.
|
* This function will initial STM32 board.
|
||||||
*/
|
*/
|
||||||
RT_WEAK void rt_hw_board_init(void)
|
rt_weak void rt_hw_board_init(void)
|
||||||
{
|
{
|
||||||
#ifdef BSP_SCB_ENABLE_I_CACHE
|
#ifdef BSP_SCB_ENABLE_I_CACHE
|
||||||
/* Enable I-Cache---------------------------------------------------------*/
|
/* Enable I-Cache---------------------------------------------------------*/
|
||||||
|
|
|
@ -231,22 +231,22 @@ int rt_hw_lcd_init(void)
|
||||||
INIT_DEVICE_EXPORT(rt_hw_lcd_init);
|
INIT_DEVICE_EXPORT(rt_hw_lcd_init);
|
||||||
|
|
||||||
|
|
||||||
RT_WEAK void stm32_mipi_lcd_init(void)
|
rt_weak void stm32_mipi_lcd_init(void)
|
||||||
{
|
{
|
||||||
rt_kprintf("please Implementation function %s\n", __func__);
|
rt_kprintf("please Implementation function %s\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void stm32_mipi_lcd_config(rt_uint32_t pixel_format)
|
rt_weak void stm32_mipi_lcd_config(rt_uint32_t pixel_format)
|
||||||
{
|
{
|
||||||
rt_kprintf("please Implementation function %s\n", __func__);
|
rt_kprintf("please Implementation function %s\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void stm32_mipi_display_on(void)
|
rt_weak void stm32_mipi_display_on(void)
|
||||||
{
|
{
|
||||||
rt_kprintf("please Implementation function %s\n", __func__);
|
rt_kprintf("please Implementation function %s\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void stm32_mipi_display_off(void)
|
rt_weak void stm32_mipi_display_off(void)
|
||||||
{
|
{
|
||||||
rt_kprintf("please Implementation function %s\n", __func__);
|
rt_kprintf("please Implementation function %s\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,12 +43,12 @@ static RTC_AlarmTypeDef Alarm_InitStruct = { 0 };
|
||||||
static struct rtc_device_object rtc_device;
|
static struct rtc_device_object rtc_device;
|
||||||
static RTC_HandleTypeDef RTC_Handler;
|
static RTC_HandleTypeDef RTC_Handler;
|
||||||
|
|
||||||
RT_WEAK uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister)
|
rt_weak uint32_t HAL_RTCEx_BKUPRead(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister)
|
||||||
{
|
{
|
||||||
return (~BKUP_REG_DATA);
|
return (~BKUP_REG_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data)
|
rt_weak void HAL_RTCEx_BKUPWrite(RTC_HandleTypeDef *hrtc, uint32_t BackupRegister, uint32_t Data)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ struct rthw_sdio
|
||||||
struct sdio_pkg *pkg;
|
struct sdio_pkg *pkg;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(SDIO_ALIGN_LEN)
|
rt_align(SDIO_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
||||||
|
|
||||||
static rt_uint32_t stm32_sdio_clk_get(struct stm32_sdio *hw_sdio)
|
static rt_uint32_t stm32_sdio_clk_get(struct stm32_sdio *hw_sdio)
|
||||||
|
|
|
@ -40,7 +40,7 @@ struct rthw_sdio
|
||||||
struct sdio_pkg *pkg;
|
struct sdio_pkg *pkg;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(SDIO_ALIGN_LEN)
|
rt_align(SDIO_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -41,7 +41,7 @@ struct rthw_sdio
|
||||||
struct sdio_pkg *pkg;
|
struct sdio_pkg *pkg;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(SDIO_ALIGN_LEN)
|
rt_align(SDIO_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -46,7 +46,7 @@ struct rthw_sdio
|
||||||
struct sdio_pkg *pkg;
|
struct sdio_pkg *pkg;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(SDIO_ALIGN_LEN)
|
rt_align(SDIO_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -36,7 +36,7 @@ extern int wifi_hw_init(void);
|
||||||
static rt_bool_t init_flag = 0;
|
static rt_bool_t init_flag = 0;
|
||||||
static const struct fal_partition *partition = RT_NULL;
|
static const struct fal_partition *partition = RT_NULL;
|
||||||
|
|
||||||
ALIGN(64)
|
rt_align(64)
|
||||||
static const char wifi_nvram_image[] =
|
static const char wifi_nvram_image[] =
|
||||||
// # The following parameter values are just placeholders, need to be updated.
|
// # The following parameter values are just placeholders, need to be updated.
|
||||||
"manfid=0x2d0" "\x00"
|
"manfid=0x2d0" "\x00"
|
||||||
|
|
|
@ -129,16 +129,16 @@ rt_uint16_t MFX_IO_ReadMultiple(rt_uint16_t Addr, rt_uint8_t Reg, rt_uint8_t *Bu
|
||||||
return read_reg(rt_mfx.i2c_bus, Reg, Length, Buffer);
|
return read_reg(rt_mfx.i2c_bus, Reg, Length, Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void MFX_IO_Delay(rt_uint32_t Delay)
|
rt_weak void MFX_IO_Delay(rt_uint32_t Delay)
|
||||||
{
|
{
|
||||||
rt_thread_delay(Delay);
|
rt_thread_delay(Delay);
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void MFX_IO_Wakeup(void)
|
rt_weak void MFX_IO_Wakeup(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void MFX_IO_EnableWakeupPin(void)
|
rt_weak void MFX_IO_EnableWakeupPin(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ struct swm_sdio_device
|
||||||
struct swm_sdio_pkg *pkg;
|
struct swm_sdio_pkg *pkg;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(SDIO_ALIGN_LEN)
|
rt_align(SDIO_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -57,7 +57,7 @@ struct swm_sdio_device
|
||||||
struct swm_sdio_pkg *pkg;
|
struct swm_sdio_pkg *pkg;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(SDIO_ALIGN_LEN)
|
rt_align(SDIO_ALIGN_LEN)
|
||||||
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
static rt_uint8_t cache_buf[SDIO_BUFF_SIZE];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -34,12 +34,12 @@ static uint32_t _SysTick_Config(rt_uint32_t ticks)
|
||||||
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
||||||
#define RT_HEAP_SIZE 2048
|
#define RT_HEAP_SIZE 2048
|
||||||
static uint32_t rt_heap[RT_HEAP_SIZE];/* heap default size: 4K(1024 * 4)*/
|
static uint32_t rt_heap[RT_HEAP_SIZE];/* heap default size: 4K(1024 * 4)*/
|
||||||
RT_WEAK void *rt_heap_begin_get(void)
|
rt_weak void *rt_heap_begin_get(void)
|
||||||
{
|
{
|
||||||
return rt_heap;
|
return rt_heap;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void *rt_heap_end_get(void)
|
rt_weak void *rt_heap_end_get(void)
|
||||||
{
|
{
|
||||||
return rt_heap + RT_HEAP_SIZE;
|
return rt_heap + RT_HEAP_SIZE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
#if 0
|
#if 0
|
||||||
struct rt_semaphore sem1, sem2;
|
struct rt_semaphore sem1, sem2;
|
||||||
static struct rt_thread thread1;
|
static struct rt_thread thread1;
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static rt_uint8_t thread1_stack[THREAD_STACK_SIZE];
|
static rt_uint8_t thread1_stack[THREAD_STACK_SIZE];
|
||||||
static struct rt_thread thread2;
|
static struct rt_thread thread2;
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static rt_uint8_t thread2_stack[THREAD_STACK_SIZE];
|
static rt_uint8_t thread2_stack[THREAD_STACK_SIZE];
|
||||||
|
|
||||||
static void thread1_entry(void* parameter)
|
static void thread1_entry(void* parameter)
|
||||||
|
@ -64,7 +64,7 @@ int rt_application_init()
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static struct rt_thread thread1;
|
static struct rt_thread thread1;
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static rt_uint8_t thread1_stack[THREAD_STACK_SIZE];
|
static rt_uint8_t thread1_stack[THREAD_STACK_SIZE];
|
||||||
rt_timer_t ttimer;
|
rt_timer_t ttimer;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
static struct rt_thread led;
|
static struct rt_thread led;
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t led_stack[256];
|
static rt_uint8_t led_stack[256];
|
||||||
|
|
||||||
static void rt_thread_entry_led(void *parameter)
|
static void rt_thread_entry_led(void *parameter)
|
||||||
|
|
|
@ -100,7 +100,7 @@ static struct ch32v307x_can_obj drv_can2 =
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BSP_USING_CAN
|
#ifdef BSP_USING_CAN
|
||||||
RT_WEAK void ch32v307x_can_gpio_init(CAN_TypeDef *can_base)
|
rt_weak void ch32v307x_can_gpio_init(CAN_TypeDef *can_base)
|
||||||
{
|
{
|
||||||
GPIO_InitTypeDef GPIO_InitSturcture={0};
|
GPIO_InitTypeDef GPIO_InitSturcture={0};
|
||||||
#ifdef BSP_USING_CAN1
|
#ifdef BSP_USING_CAN1
|
||||||
|
|
|
@ -53,12 +53,12 @@ static uint32_t _SysTick_Config(rt_uint32_t ticks)
|
||||||
#define RT_HEAP_SIZE (1024)
|
#define RT_HEAP_SIZE (1024)
|
||||||
/* heap default size: 4K(1024 * 4) */
|
/* heap default size: 4K(1024 * 4) */
|
||||||
static uint32_t rt_heap[RT_HEAP_SIZE];
|
static uint32_t rt_heap[RT_HEAP_SIZE];
|
||||||
RT_WEAK void *rt_heap_begin_get(void)
|
rt_weak void *rt_heap_begin_get(void)
|
||||||
{
|
{
|
||||||
return rt_heap;
|
return rt_heap;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void *rt_heap_end_get(void)
|
rt_weak void *rt_heap_end_get(void)
|
||||||
{
|
{
|
||||||
return rt_heap + RT_HEAP_SIZE;
|
return rt_heap + RT_HEAP_SIZE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,12 +33,12 @@ static uint32_t _SysTick_Config(rt_uint32_t ticks)
|
||||||
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
||||||
#define RT_HEAP_SIZE (4096)
|
#define RT_HEAP_SIZE (4096)
|
||||||
static uint32_t rt_heap[RT_HEAP_SIZE];
|
static uint32_t rt_heap[RT_HEAP_SIZE];
|
||||||
RT_WEAK void *rt_heap_begin_get(void)
|
rt_weak void *rt_heap_begin_get(void)
|
||||||
{
|
{
|
||||||
return rt_heap;
|
return rt_heap;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void *rt_heap_end_get(void)
|
rt_weak void *rt_heap_end_get(void)
|
||||||
{
|
{
|
||||||
return rt_heap + RT_HEAP_SIZE;
|
return rt_heap + RT_HEAP_SIZE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ void rt_init_thread_entry(void *parameter)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/*the led thread*/
|
/*the led thread*/
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t led_stack[ 512 ];
|
static rt_uint8_t led_stack[ 512 ];
|
||||||
static struct rt_thread led_thread;
|
static struct rt_thread led_thread;
|
||||||
static void led_thread_entry(void *parameter)
|
static void led_thread_entry(void *parameter)
|
||||||
|
|
|
@ -25,13 +25,13 @@ static const unsigned char _dummy_txt[] =
|
||||||
0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x21, 0x0d, 0x0a,
|
0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x21, 0x0d, 0x0a,
|
||||||
};
|
};
|
||||||
|
|
||||||
RT_WEAK const struct romfs_dirent _root_dirent[] =
|
rt_weak const struct romfs_dirent _root_dirent[] =
|
||||||
{
|
{
|
||||||
{ROMFS_DIRENT_DIR, "dummy", (rt_uint8_t *)_dummy, sizeof(_dummy) / sizeof(_dummy[0])},
|
{ROMFS_DIRENT_DIR, "dummy", (rt_uint8_t *)_dummy, sizeof(_dummy) / sizeof(_dummy[0])},
|
||||||
{ROMFS_DIRENT_FILE, "dummy.txt", _dummy_txt, sizeof(_dummy_txt)},
|
{ROMFS_DIRENT_FILE, "dummy.txt", _dummy_txt, sizeof(_dummy_txt)},
|
||||||
};
|
};
|
||||||
|
|
||||||
RT_WEAK const struct romfs_dirent romfs_root =
|
rt_weak const struct romfs_dirent romfs_root =
|
||||||
{
|
{
|
||||||
ROMFS_DIRENT_DIR, "/", (rt_uint8_t *)_root_dirent, sizeof(_root_dirent) / sizeof(_root_dirent[0])
|
ROMFS_DIRENT_DIR, "/", (rt_uint8_t *)_root_dirent, sizeof(_root_dirent) / sizeof(_root_dirent[0])
|
||||||
};
|
};
|
||||||
|
|
|
@ -64,12 +64,12 @@ static rt_uint8_t _pm_default_deepsleep = RT_PM_DEFAULT_DEEPSLEEP_MODE;
|
||||||
static struct rt_pm_notify _pm_notify;
|
static struct rt_pm_notify _pm_notify;
|
||||||
static rt_uint8_t _pm_init_flag = 0;
|
static rt_uint8_t _pm_init_flag = 0;
|
||||||
|
|
||||||
RT_WEAK rt_uint32_t rt_pm_enter_critical(rt_uint8_t sleep_mode)
|
rt_weak rt_uint32_t rt_pm_enter_critical(rt_uint8_t sleep_mode)
|
||||||
{
|
{
|
||||||
return rt_hw_interrupt_disable();
|
return rt_hw_interrupt_disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK void rt_pm_exit_critical(rt_uint32_t ctx, rt_uint8_t sleep_mode)
|
rt_weak void rt_pm_exit_critical(rt_uint32_t ctx, rt_uint8_t sleep_mode)
|
||||||
{
|
{
|
||||||
rt_hw_interrupt_enable(ctx);
|
rt_hw_interrupt_enable(ctx);
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,7 @@ static rt_bool_t _pm_device_check_idle(void)
|
||||||
return RT_TRUE;
|
return RT_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
RT_WEAK rt_tick_t pm_timer_next_timeout_tick(rt_uint8_t mode)
|
rt_weak rt_tick_t pm_timer_next_timeout_tick(rt_uint8_t mode)
|
||||||
{
|
{
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
|
@ -310,7 +310,7 @@ RT_WEAK rt_tick_t pm_timer_next_timeout_tick(rt_uint8_t mode)
|
||||||
*
|
*
|
||||||
* @return none
|
* @return none
|
||||||
*/
|
*/
|
||||||
RT_WEAK rt_uint8_t pm_get_sleep_threshold_mode(rt_uint8_t cur_mode, rt_tick_t timeout_tick)
|
rt_weak rt_uint8_t pm_get_sleep_threshold_mode(rt_uint8_t cur_mode, rt_tick_t timeout_tick)
|
||||||
{
|
{
|
||||||
rt_uint8_t sleep_mode = cur_mode;
|
rt_uint8_t sleep_mode = cur_mode;
|
||||||
|
|
||||||
|
|
|
@ -68,12 +68,12 @@ struct rw009_wifi
|
||||||
struct rt_mailbox rw009_cmd_mb;
|
struct rt_mailbox rw009_cmd_mb;
|
||||||
uint32_t last_cmd;
|
uint32_t last_cmd;
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
rt_uint8_t spi_tx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_TX_POOL_SIZE];
|
rt_uint8_t spi_tx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_TX_POOL_SIZE];
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
rt_uint8_t spi_rx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_RX_POOL_SIZE];
|
rt_uint8_t spi_rx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_RX_POOL_SIZE];
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
uint8_t spi_hw_rx_buffer[MAX_SPI_BUFFER_SIZE];
|
uint8_t spi_hw_rx_buffer[MAX_SPI_BUFFER_SIZE];
|
||||||
|
|
||||||
/* status for RW009 */
|
/* status for RW009 */
|
||||||
|
|
|
@ -88,7 +88,7 @@ struct uac_audio_mic
|
||||||
};
|
};
|
||||||
static struct uac_audio_mic mic;
|
static struct uac_audio_mic mic;
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct udevice_descriptor dev_desc =
|
static struct udevice_descriptor dev_desc =
|
||||||
{
|
{
|
||||||
USB_DESC_LENGTH_DEVICE, //bLength;
|
USB_DESC_LENGTH_DEVICE, //bLength;
|
||||||
|
@ -108,7 +108,7 @@ static struct udevice_descriptor dev_desc =
|
||||||
};
|
};
|
||||||
|
|
||||||
//FS and HS needed
|
//FS and HS needed
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct usb_qualifier_descriptor dev_qualifier =
|
static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
{
|
{
|
||||||
sizeof(dev_qualifier), //bLength
|
sizeof(dev_qualifier), //bLength
|
||||||
|
@ -122,7 +122,7 @@ static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static char *_ustring[] =
|
const static char *_ustring[] =
|
||||||
{
|
{
|
||||||
"Language",
|
"Language",
|
||||||
|
@ -133,7 +133,7 @@ const static char *_ustring[] =
|
||||||
"Interface",
|
"Interface",
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct uac_ac_descriptor ac_desc =
|
static struct uac_ac_descriptor ac_desc =
|
||||||
{
|
{
|
||||||
#ifdef RT_USB_DEVICE_COMPOSITE
|
#ifdef RT_USB_DEVICE_COMPOSITE
|
||||||
|
@ -214,7 +214,7 @@ static struct uac_ac_descriptor ac_desc =
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct uinterface_descriptor as_desc0 =
|
static struct uinterface_descriptor as_desc0 =
|
||||||
{
|
{
|
||||||
USB_DESC_LENGTH_INTERFACE,
|
USB_DESC_LENGTH_INTERFACE,
|
||||||
|
@ -228,7 +228,7 @@ static struct uinterface_descriptor as_desc0 =
|
||||||
0x00,
|
0x00,
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct uac_as_descriptor as_desc =
|
static struct uac_as_descriptor as_desc =
|
||||||
{
|
{
|
||||||
/* Interface Descriptor */
|
/* Interface Descriptor */
|
||||||
|
|
|
@ -89,7 +89,7 @@ struct uac_audio_speaker
|
||||||
};
|
};
|
||||||
static struct uac_audio_speaker speaker;
|
static struct uac_audio_speaker speaker;
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct udevice_descriptor dev_desc =
|
static struct udevice_descriptor dev_desc =
|
||||||
{
|
{
|
||||||
USB_DESC_LENGTH_DEVICE, //bLength;
|
USB_DESC_LENGTH_DEVICE, //bLength;
|
||||||
|
@ -109,7 +109,7 @@ static struct udevice_descriptor dev_desc =
|
||||||
};
|
};
|
||||||
|
|
||||||
//FS and HS needed
|
//FS and HS needed
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct usb_qualifier_descriptor dev_qualifier =
|
static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
{
|
{
|
||||||
sizeof(dev_qualifier), //bLength
|
sizeof(dev_qualifier), //bLength
|
||||||
|
@ -123,7 +123,7 @@ static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static char *_ustring[] =
|
const static char *_ustring[] =
|
||||||
{
|
{
|
||||||
"Language",
|
"Language",
|
||||||
|
@ -134,7 +134,7 @@ const static char *_ustring[] =
|
||||||
"Interface",
|
"Interface",
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct uac_ac_descriptor ac_desc =
|
static struct uac_ac_descriptor ac_desc =
|
||||||
{
|
{
|
||||||
#ifdef RT_USB_DEVICE_COMPOSITE
|
#ifdef RT_USB_DEVICE_COMPOSITE
|
||||||
|
@ -214,7 +214,7 @@ static struct uac_ac_descriptor ac_desc =
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct uinterface_descriptor as_desc0 =
|
static struct uinterface_descriptor as_desc0 =
|
||||||
{
|
{
|
||||||
USB_DESC_LENGTH_INTERFACE,
|
USB_DESC_LENGTH_INTERFACE,
|
||||||
|
@ -228,7 +228,7 @@ static struct uinterface_descriptor as_desc0 =
|
||||||
0x00,
|
0x00,
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct uac_as_descriptor as_desc =
|
static struct uac_as_descriptor as_desc =
|
||||||
{
|
{
|
||||||
/* Interface Descriptor */
|
/* Interface Descriptor */
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
#define _SER_NO_LEN 14 /*rt_strlen("32021919830108")*/
|
#define _SER_NO_LEN 14 /*rt_strlen("32021919830108")*/
|
||||||
#endif /*RT_VCOM_SER_LEN*/
|
#endif /*RT_VCOM_SER_LEN*/
|
||||||
|
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t vcom_thread_stack[VCOM_TASK_STK_SIZE];
|
static rt_uint8_t vcom_thread_stack[VCOM_TASK_STK_SIZE];
|
||||||
static struct rt_thread vcom_thread;
|
static struct rt_thread vcom_thread;
|
||||||
static struct ucdc_line_coding line_coding;
|
static struct ucdc_line_coding line_coding;
|
||||||
|
@ -91,7 +91,7 @@ struct vcom_tx_msg
|
||||||
rt_size_t size;
|
rt_size_t size;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct udevice_descriptor dev_desc =
|
static struct udevice_descriptor dev_desc =
|
||||||
{
|
{
|
||||||
USB_DESC_LENGTH_DEVICE, //bLength;
|
USB_DESC_LENGTH_DEVICE, //bLength;
|
||||||
|
@ -111,7 +111,7 @@ static struct udevice_descriptor dev_desc =
|
||||||
};
|
};
|
||||||
|
|
||||||
//FS and HS needed
|
//FS and HS needed
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct usb_qualifier_descriptor dev_qualifier =
|
static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
{
|
{
|
||||||
sizeof(dev_qualifier), //bLength
|
sizeof(dev_qualifier), //bLength
|
||||||
|
@ -126,7 +126,7 @@ static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
};
|
};
|
||||||
|
|
||||||
/* communcation interface descriptor */
|
/* communcation interface descriptor */
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static struct ucdc_comm_descriptor _comm_desc =
|
const static struct ucdc_comm_descriptor _comm_desc =
|
||||||
{
|
{
|
||||||
#ifdef RT_USB_DEVICE_COMPOSITE
|
#ifdef RT_USB_DEVICE_COMPOSITE
|
||||||
|
@ -200,7 +200,7 @@ const static struct ucdc_comm_descriptor _comm_desc =
|
||||||
};
|
};
|
||||||
|
|
||||||
/* data interface descriptor */
|
/* data interface descriptor */
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static struct ucdc_data_descriptor _data_desc =
|
const static struct ucdc_data_descriptor _data_desc =
|
||||||
{
|
{
|
||||||
/* interface descriptor */
|
/* interface descriptor */
|
||||||
|
@ -234,15 +234,15 @@ const static struct ucdc_data_descriptor _data_desc =
|
||||||
0x00,
|
0x00,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static char serno[_SER_NO_LEN + 1] = {'\0'};
|
static char serno[_SER_NO_LEN + 1] = {'\0'};
|
||||||
RT_WEAK rt_err_t vcom_get_stored_serno(char *serno, int size);
|
rt_weak rt_err_t vcom_get_stored_serno(char *serno, int size);
|
||||||
|
|
||||||
rt_err_t vcom_get_stored_serno(char *serno, int size)
|
rt_err_t vcom_get_stored_serno(char *serno, int size)
|
||||||
{
|
{
|
||||||
return RT_ERROR;
|
return RT_ERROR;
|
||||||
}
|
}
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static char* _ustring[] =
|
const static char* _ustring[] =
|
||||||
{
|
{
|
||||||
"Language",
|
"Language",
|
||||||
|
|
|
@ -36,13 +36,13 @@ struct rt_ecm_eth
|
||||||
rt_uint8_t host_addr[MAX_ADDR_LEN];
|
rt_uint8_t host_addr[MAX_ADDR_LEN];
|
||||||
rt_uint8_t dev_addr[MAX_ADDR_LEN];
|
rt_uint8_t dev_addr[MAX_ADDR_LEN];
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
rt_uint8_t rx_pool[512];
|
rt_uint8_t rx_pool[512];
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
rt_size_t rx_size;
|
rt_size_t rx_size;
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
rt_size_t rx_offset;
|
rt_size_t rx_offset;
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
char rx_buffer[USB_ETH_MTU];
|
char rx_buffer[USB_ETH_MTU];
|
||||||
char tx_buffer[USB_ETH_MTU];
|
char tx_buffer[USB_ETH_MTU];
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ struct rt_ecm_eth
|
||||||
};
|
};
|
||||||
typedef struct rt_ecm_eth * rt_ecm_eth_t;
|
typedef struct rt_ecm_eth * rt_ecm_eth_t;
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct udevice_descriptor _dev_desc =
|
static struct udevice_descriptor _dev_desc =
|
||||||
{
|
{
|
||||||
USB_DESC_LENGTH_DEVICE, /* bLength */
|
USB_DESC_LENGTH_DEVICE, /* bLength */
|
||||||
|
@ -71,7 +71,7 @@ static struct udevice_descriptor _dev_desc =
|
||||||
};
|
};
|
||||||
|
|
||||||
/* communcation interface descriptor */
|
/* communcation interface descriptor */
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static struct ucdc_eth_descriptor _comm_desc =
|
const static struct ucdc_eth_descriptor _comm_desc =
|
||||||
{
|
{
|
||||||
#ifdef RT_USB_DEVICE_COMPOSITE
|
#ifdef RT_USB_DEVICE_COMPOSITE
|
||||||
|
@ -141,7 +141,7 @@ const static struct ucdc_eth_descriptor _comm_desc =
|
||||||
};
|
};
|
||||||
|
|
||||||
/* data interface descriptor */
|
/* data interface descriptor */
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static struct ucdc_data_descriptor _data_desc =
|
const static struct ucdc_data_descriptor _data_desc =
|
||||||
{
|
{
|
||||||
/* interface descriptor */
|
/* interface descriptor */
|
||||||
|
@ -176,7 +176,7 @@ const static struct ucdc_data_descriptor _data_desc =
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static char* _ustring[] =
|
const static char* _ustring[] =
|
||||||
{
|
{
|
||||||
"Language", /* LANGID */
|
"Language", /* LANGID */
|
||||||
|
@ -187,7 +187,7 @@ const static char* _ustring[] =
|
||||||
"Interface", /* INTERFACE */
|
"Interface", /* INTERFACE */
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
//FS and HS needed
|
//FS and HS needed
|
||||||
static struct usb_qualifier_descriptor dev_qualifier =
|
static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,7 +31,7 @@ struct hid_s
|
||||||
};
|
};
|
||||||
|
|
||||||
/* CustomHID_ConfigDescriptor */
|
/* CustomHID_ConfigDescriptor */
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const rt_uint8_t _report_desc[]=
|
const rt_uint8_t _report_desc[]=
|
||||||
{
|
{
|
||||||
#ifdef RT_USB_DEVICE_HID_KEYBOARD
|
#ifdef RT_USB_DEVICE_HID_KEYBOARD
|
||||||
|
@ -236,7 +236,7 @@ const rt_uint8_t _report_desc[]=
|
||||||
#endif
|
#endif
|
||||||
}; /* CustomHID_ReportDescriptor */
|
}; /* CustomHID_ReportDescriptor */
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct udevice_descriptor _dev_desc =
|
static struct udevice_descriptor _dev_desc =
|
||||||
{
|
{
|
||||||
USB_DESC_LENGTH_DEVICE, //bLength;
|
USB_DESC_LENGTH_DEVICE, //bLength;
|
||||||
|
@ -256,7 +256,7 @@ static struct udevice_descriptor _dev_desc =
|
||||||
};
|
};
|
||||||
|
|
||||||
//FS and HS needed
|
//FS and HS needed
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct usb_qualifier_descriptor dev_qualifier =
|
static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
{
|
{
|
||||||
sizeof(dev_qualifier), //bLength
|
sizeof(dev_qualifier), //bLength
|
||||||
|
@ -272,7 +272,7 @@ static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
|
|
||||||
|
|
||||||
/* hid interface descriptor */
|
/* hid interface descriptor */
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static struct uhid_comm_descriptor _hid_comm_desc =
|
const static struct uhid_comm_descriptor _hid_comm_desc =
|
||||||
{
|
{
|
||||||
#ifdef RT_USB_DEVICE_COMPOSITE
|
#ifdef RT_USB_DEVICE_COMPOSITE
|
||||||
|
@ -361,7 +361,7 @@ const static struct uhid_comm_descriptor _hid_comm_desc =
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static char* _ustring[] =
|
const static char* _ustring[] =
|
||||||
{
|
{
|
||||||
"Language",
|
"Language",
|
||||||
|
@ -612,11 +612,11 @@ static rt_size_t _hid_write(rt_device_t dev, rt_off_t pos, const void *buffer, r
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
RT_WEAK void HID_Report_Received(hid_report_t report)
|
rt_weak void HID_Report_Received(hid_report_t report)
|
||||||
{
|
{
|
||||||
dump_report(report);
|
dump_report(report);
|
||||||
}
|
}
|
||||||
ALIGN(RT_ALIGN_SIZE)
|
rt_align(RT_ALIGN_SIZE)
|
||||||
static rt_uint8_t hid_thread_stack[512];
|
static rt_uint8_t hid_thread_stack[512];
|
||||||
static struct rt_thread hid_thread;
|
static struct rt_thread hid_thread;
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ struct mstorage
|
||||||
struct rt_device_blk_geometry geometry;
|
struct rt_device_blk_geometry geometry;
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct udevice_descriptor dev_desc =
|
static struct udevice_descriptor dev_desc =
|
||||||
{
|
{
|
||||||
USB_DESC_LENGTH_DEVICE, //bLength;
|
USB_DESC_LENGTH_DEVICE, //bLength;
|
||||||
|
@ -91,7 +91,7 @@ static struct udevice_descriptor dev_desc =
|
||||||
};
|
};
|
||||||
|
|
||||||
//FS and HS needed
|
//FS and HS needed
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct usb_qualifier_descriptor dev_qualifier =
|
static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
{
|
{
|
||||||
sizeof(dev_qualifier), //bLength
|
sizeof(dev_qualifier), //bLength
|
||||||
|
@ -106,7 +106,7 @@ static struct usb_qualifier_descriptor dev_qualifier =
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static struct umass_descriptor _mass_desc =
|
const static struct umass_descriptor _mass_desc =
|
||||||
{
|
{
|
||||||
#ifdef RT_USB_DEVICE_COMPOSITE
|
#ifdef RT_USB_DEVICE_COMPOSITE
|
||||||
|
@ -157,7 +157,7 @@ const static struct umass_descriptor _mass_desc =
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
const static char* _ustring[] =
|
const static char* _ustring[] =
|
||||||
{
|
{
|
||||||
"Language",
|
"Language",
|
||||||
|
@ -180,7 +180,7 @@ static rt_size_t _read_10(ufunction_t func, ustorage_cbw_t cbw);
|
||||||
static rt_size_t _write_10(ufunction_t func, ustorage_cbw_t cbw);
|
static rt_size_t _write_10(ufunction_t func, ustorage_cbw_t cbw);
|
||||||
static rt_size_t _verify_10(ufunction_t func, ustorage_cbw_t cbw);
|
static rt_size_t _verify_10(ufunction_t func, ustorage_cbw_t cbw);
|
||||||
|
|
||||||
ALIGN(4)
|
rt_align(4)
|
||||||
static struct scsi_cmd cmd_data[] =
|
static struct scsi_cmd cmd_data[] =
|
||||||
{
|
{
|
||||||
{SCSI_TEST_UNIT_READY, _test_unit_ready, 6, FIXED, 0, DIR_NONE},
|
{SCSI_TEST_UNIT_READY, _test_unit_ready, 6, FIXED, 0, DIR_NONE},
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue