mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-10 06:48:51 +00:00
[fix][examples/adc/boot/i2s] delete unused flag noun in xxx_register
This commit is contained in:
parent
c932e33c61
commit
3f8f00e4df
13 changed files with 16 additions and 81 deletions
|
@ -304,7 +304,7 @@ static void keypad_init(void)
|
||||||
adc_channel_cfg.neg_channel = negChList;
|
adc_channel_cfg.neg_channel = negChList;
|
||||||
adc_channel_cfg.num = 1;
|
adc_channel_cfg.num = 1;
|
||||||
|
|
||||||
adc_register(ADC0_INDEX, "adc_key", DEVICE_OFLAG_STREAM_RX);
|
adc_register(ADC0_INDEX, "adc_key");
|
||||||
|
|
||||||
adc_key = device_find("adc_key");
|
adc_key = device_find("adc_key");
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
#include "bl602_hbn.h"
|
#include "bl602_hbn.h"
|
||||||
#include "system_bl602.h"
|
#include "system_bl602.h"
|
||||||
|
|
||||||
#ifdef BOOTROM
|
|
||||||
#include "bflb_bootrom.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
Define clocks
|
Define clocks
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
@ -34,49 +30,6 @@ void SystemInit(void)
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
uint32_t tmpVal = 0;
|
uint32_t tmpVal = 0;
|
||||||
|
|
||||||
#ifdef BOOTROM
|
|
||||||
extern void GLB_Power_On_LDO18_IO(void);
|
|
||||||
extern void WDT_Disable(void);
|
|
||||||
extern void HBN_Clear_RTC_INT(void);
|
|
||||||
|
|
||||||
BMX_Cfg_Type bmxCfg = {
|
|
||||||
.timeoutEn = 0,
|
|
||||||
.errEn = DISABLE,
|
|
||||||
.arbMod = BMX_ARB_FIX
|
|
||||||
};
|
|
||||||
L1C_BMX_Cfg_Type l1cBmxCfg = {
|
|
||||||
.timeoutEn = 0,
|
|
||||||
.errEn = DISABLE,
|
|
||||||
.arbMod = L1C_BMX_ARB_FIX,
|
|
||||||
};
|
|
||||||
|
|
||||||
/* NP boot log Flag */
|
|
||||||
p = (uint32_t *)(BFLB_BOOTROM_NP_BOOT_LOG_ADDR);
|
|
||||||
*p = 0x5A5AA5A5;
|
|
||||||
/*diable BMX error incase Sbooten=0xf,while user send vector(core) reset and CPU read deadbeef,
|
|
||||||
if not disable this bit, CPU will also get hardfault at the same time*/
|
|
||||||
//GLB->bmx_cfg1.BF.bmx_err_en=0;
|
|
||||||
//GLB->bmx_cfg1.BF.bmx_timeout_en=0;
|
|
||||||
//GLB->bmx_cfg2.BF.bmx_err_addr_dis=1;
|
|
||||||
GLB_BMX_Init(&bmxCfg);
|
|
||||||
GLB_BMX_Addr_Monitor_Disable();
|
|
||||||
//L1C->l1c_config.BF.l1c_bmx_err_en=0;
|
|
||||||
//L1C->l1c_config.BF.l1c_bmx_timeout_en=0;
|
|
||||||
//L1C->l1c_bmx_err_addr_en.BF.l1c_bmx_err_addr_dis=1;
|
|
||||||
L1C_BMX_Init(&l1cBmxCfg);
|
|
||||||
L1C_BMX_Addr_Monitor_Disable();
|
|
||||||
//L1C->l1c_config.BF.l1c_way_dis=0xf;
|
|
||||||
L1C_Set_Way_Disable(0x0f);
|
|
||||||
/* Disable Watchdog */
|
|
||||||
WDT_Disable();
|
|
||||||
/* Clear RTC */
|
|
||||||
HBN_Clear_RTC_INT();
|
|
||||||
/* Make OCRAM Idle from retention or sleep */
|
|
||||||
GLB_Set_OCRAM_Idle();
|
|
||||||
/* Disable embedded flash power up*/
|
|
||||||
HBN_Set_Embedded_Flash_Pullup(DISABLE);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* disable hardware_pullup_pull_down (reg_en_hw_pu_pd = 0) */
|
/* disable hardware_pullup_pull_down (reg_en_hw_pu_pd = 0) */
|
||||||
tmpVal = BL_RD_REG(HBN_BASE, HBN_IRQ_MODE);
|
tmpVal = BL_RD_REG(HBN_BASE, HBN_IRQ_MODE);
|
||||||
tmpVal = BL_CLR_REG_BIT(tmpVal, HBN_REG_EN_HW_PU_PD);
|
tmpVal = BL_CLR_REG_BIT(tmpVal, HBN_REG_EN_HW_PU_PD);
|
||||||
|
@ -123,16 +76,9 @@ void SystemInit(void)
|
||||||
|
|
||||||
/* init bor for all platform */
|
/* init bor for all platform */
|
||||||
system_bor_init();
|
system_bor_init();
|
||||||
|
|
||||||
#ifdef BOOTROM
|
|
||||||
/*Power up soc 11 power domain,TODO: This should be optional */
|
|
||||||
//AON_Power_On_SOC_11();
|
|
||||||
/* Record LDO18 pu flag before power up. This maybe not neccessary but copy from 606*/
|
|
||||||
//BL_WR_WORD(BFLB_BOOTROM_AP_BOOT_LOG_ADDR,GLB->ldo18io.BF.pu_ldo18io);
|
|
||||||
/* Power up flash power*/
|
|
||||||
//GLB_Power_On_LDO18_IO();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void System_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
|
void System_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,10 +26,6 @@
|
||||||
#include "bl702_hbn.h"
|
#include "bl702_hbn.h"
|
||||||
#include "system_bl702.h"
|
#include "system_bl702.h"
|
||||||
|
|
||||||
#ifdef BOOTROM
|
|
||||||
#include "bflb_bootrom.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef BFLB_EFLASH_LOADER
|
#ifdef BFLB_EFLASH_LOADER
|
||||||
#include "bl702_usb.h"
|
#include "bl702_usb.h"
|
||||||
void USB_DoNothing_IRQHandler(void)
|
void USB_DoNothing_IRQHandler(void)
|
||||||
|
@ -144,18 +140,11 @@ void SystemInit(void)
|
||||||
/* init bor for all platform */
|
/* init bor for all platform */
|
||||||
system_bor_init();
|
system_bor_init();
|
||||||
|
|
||||||
#ifdef BOOTROM
|
|
||||||
/*Power up soc 11 power domain,TODO: This should be optional */
|
|
||||||
//AON_Power_On_SOC_11();
|
|
||||||
/* Record LDO18 pu flag before power up. This maybe not neccessary but copy from 606*/
|
|
||||||
//BL_WR_WORD(BFLB_BOOTROM_AP_BOOT_LOG_ADDR,GLB->ldo18io.BF.pu_ldo18io);
|
|
||||||
/* Power up flash power*/
|
|
||||||
//GLB_Power_On_LDO18_IO();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* release 64K OCARAM for appliction */
|
/* release 64K OCARAM for appliction */
|
||||||
GLB_Set_EM_Sel(GLB_EM_0KB);
|
GLB_Set_EM_Sel(GLB_EM_0KB);
|
||||||
}
|
}
|
||||||
|
|
||||||
void System_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
|
void System_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ int main(void)
|
||||||
adc_channel_cfg.num = 1;
|
adc_channel_cfg.num = 1;
|
||||||
|
|
||||||
MSG("adc one-shot differential test case \r\n");
|
MSG("adc one-shot differential test case \r\n");
|
||||||
adc_register(ADC0_INDEX, "adc_one_diff", DEVICE_OFLAG_STREAM_RX);
|
adc_register(ADC0_INDEX, "adc_one_diff");
|
||||||
|
|
||||||
adc_test = device_find("adc_one_diff");
|
adc_test = device_find("adc_one_diff");
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ int main(void)
|
||||||
adc_channel_cfg.num = 1;
|
adc_channel_cfg.num = 1;
|
||||||
|
|
||||||
MSG("adc continue single ended test case \r\n");
|
MSG("adc continue single ended test case \r\n");
|
||||||
adc_register(ADC0_INDEX, "adc_continue_single", DEVICE_OFLAG_STREAM_RX);
|
adc_register(ADC0_INDEX, "adc_continue_single");
|
||||||
|
|
||||||
adc_test = device_find("adc_continue_single");
|
adc_test = device_find("adc_continue_single");
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ int main(void)
|
||||||
adc_channel_cfg.neg_channel = negChList;
|
adc_channel_cfg.neg_channel = negChList;
|
||||||
adc_channel_cfg.num = 1;
|
adc_channel_cfg.num = 1;
|
||||||
|
|
||||||
adc_register(ADC0_INDEX, "adc_key", DEVICE_OFLAG_STREAM_RX);
|
adc_register(ADC0_INDEX, "adc_key");
|
||||||
|
|
||||||
adc_key = device_find("adc_key");
|
adc_key = device_find("adc_key");
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ int main(void)
|
||||||
adc_channel_cfg.num = 1;
|
adc_channel_cfg.num = 1;
|
||||||
|
|
||||||
MSG("adc one-shot differential test case \r\n");
|
MSG("adc one-shot differential test case \r\n");
|
||||||
adc_register(ADC0_INDEX, "adc_one_diff", DEVICE_OFLAG_STREAM_RX);
|
adc_register(ADC0_INDEX, "adc_one_diff");
|
||||||
|
|
||||||
adc_test = device_find("adc_one_diff");
|
adc_test = device_find("adc_one_diff");
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ int main(void)
|
||||||
adc_channel_cfg.num = 1;
|
adc_channel_cfg.num = 1;
|
||||||
|
|
||||||
MSG("adc one-shot single ended test case \r\n");
|
MSG("adc one-shot single ended test case \r\n");
|
||||||
adc_register(ADC0_INDEX, "adc_one_single", DEVICE_OFLAG_STREAM_RX);
|
adc_register(ADC0_INDEX, "adc_one_single");
|
||||||
|
|
||||||
adc_test = device_find("adc_one_single");
|
adc_test = device_find("adc_one_single");
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ int main(void)
|
||||||
adc_channel_cfg.num = 2;
|
adc_channel_cfg.num = 2;
|
||||||
|
|
||||||
MSG("adc one-shot single ended test case \r\n");
|
MSG("adc one-shot single ended test case \r\n");
|
||||||
adc_register(ADC0_INDEX, "adc_one_single", DEVICE_OFLAG_STREAM_RX);
|
adc_register(ADC0_INDEX, "adc_one_single");
|
||||||
|
|
||||||
adc_test = device_find("adc_one_single");
|
adc_test = device_find("adc_one_single");
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ int main(void)
|
||||||
adc_channel_cfg.num = 1;
|
adc_channel_cfg.num = 1;
|
||||||
|
|
||||||
MSG("adc tsen test case \r\n");
|
MSG("adc tsen test case \r\n");
|
||||||
adc_register(ADC0_INDEX, "adc_tsen", DEVICE_OFLAG_STREAM_RX);
|
adc_register(ADC0_INDEX, "adc_tsen");
|
||||||
|
|
||||||
adc_tsen = device_find("adc_tsen");
|
adc_tsen = device_find("adc_tsen");
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ int main(void)
|
||||||
adc_channel_cfg.neg_channel = negChList;
|
adc_channel_cfg.neg_channel = negChList;
|
||||||
adc_channel_cfg.num = 1;
|
adc_channel_cfg.num = 1;
|
||||||
|
|
||||||
adc_register(ADC0_INDEX, "adc_vbat_test", DEVICE_OFLAG_STREAM_RX);
|
adc_register(ADC0_INDEX, "adc_vbat_test");
|
||||||
|
|
||||||
vbat_test = device_find("adc_vbat_test");
|
vbat_test = device_find("adc_vbat_test");
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ static void ATTR_TCM_SECTION uart0_irq_callback(struct device *dev, void *args,
|
||||||
|
|
||||||
static void bflb_eflash_loader_usart_if_init(uint32_t bdrate)
|
static void bflb_eflash_loader_usart_if_init(uint32_t bdrate)
|
||||||
{
|
{
|
||||||
uart_register(0, "download_uart", DEVICE_OFLAG_RDWR);
|
uart_register(0, "download_uart");
|
||||||
download_uart = device_find("download_uart");
|
download_uart = device_find("download_uart");
|
||||||
|
|
||||||
if (download_uart) {
|
if (download_uart) {
|
||||||
|
|
|
@ -169,7 +169,7 @@ static int sd_wav_play_init(audio_dev_t *audio_dev, const TCHAR *path)
|
||||||
if (audio_dev->device) {
|
if (audio_dev->device) {
|
||||||
device_close(audio_dev->device);
|
device_close(audio_dev->device);
|
||||||
} else {
|
} else {
|
||||||
i2s_register(I2S0_INDEX, "I2S", DEVICE_OFLAG_RDWR);
|
i2s_register(I2S0_INDEX, "I2S");
|
||||||
audio_dev->device = device_find("I2S");
|
audio_dev->device = device_find("I2S");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ static int sd_wav_play_init(audio_dev_t *audio_dev, const TCHAR *path)
|
||||||
if (dma_ch2) {
|
if (dma_ch2) {
|
||||||
device_close(dma_ch2);
|
device_close(dma_ch2);
|
||||||
} else {
|
} else {
|
||||||
dma_register(DMA0_CH2_INDEX, "i2s_ch2", DEVICE_OFLAG_RDWR);
|
dma_register(DMA0_CH2_INDEX, "i2s_ch2");
|
||||||
dma_ch2 = device_find("i2s_ch2");
|
dma_ch2 = device_find("i2s_ch2");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue