Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
f18dfa08
R
rt-thread
项目概览
BaiXuePrincess
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f18dfa08
编写于
3月 11, 2021
作者:
mysterywolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
auto formatted
上级
849c99d2
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
101 addition
and
101 deletion
+101
-101
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
+6
-6
bsp/bluetrum/ab32vg1-ab-prougen/board/board.h
bsp/bluetrum/ab32vg1-ab-prougen/board/board.h
+1
-1
bsp/bluetrum/ab32vg1-ab-prougen/board/ports/audio/drv_sound.c
...bluetrum/ab32vg1-ab-prougen/board/ports/audio/drv_sound.c
+20
-20
bsp/bluetrum/libcpu/cpu/cpuport.c
bsp/bluetrum/libcpu/cpu/cpuport.c
+2
-2
bsp/bluetrum/libcpu/cpu/interrupt.c
bsp/bluetrum/libcpu/cpu/interrupt.c
+10
-10
bsp/bluetrum/libraries/hal_drivers/config/adc_config.h
bsp/bluetrum/libraries/hal_drivers/config/adc_config.h
+1
-1
bsp/bluetrum/libraries/hal_drivers/config/tim_config.h
bsp/bluetrum/libraries/hal_drivers/config/tim_config.h
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_adc.c
bsp/bluetrum/libraries/hal_drivers/drv_adc.c
+3
-3
bsp/bluetrum/libraries/hal_drivers/drv_common.h
bsp/bluetrum/libraries/hal_drivers/drv_common.h
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_gpio.c
bsp/bluetrum/libraries/hal_drivers/drv_gpio.c
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_gpio.h
bsp/bluetrum/libraries/hal_drivers/drv_gpio.h
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_hwtimer.c
bsp/bluetrum/libraries/hal_drivers/drv_hwtimer.c
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_log.h
bsp/bluetrum/libraries/hal_drivers/drv_log.h
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_sdio.c
bsp/bluetrum/libraries/hal_drivers/drv_sdio.c
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_sdio.h
bsp/bluetrum/libraries/hal_drivers/drv_sdio.h
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_soft_i2c.c
bsp/bluetrum/libraries/hal_drivers/drv_soft_i2c.c
+2
-2
bsp/bluetrum/libraries/hal_drivers/drv_usart.c
bsp/bluetrum/libraries/hal_drivers/drv_usart.c
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_usart.h
bsp/bluetrum/libraries/hal_drivers/drv_usart.h
+1
-1
bsp/bluetrum/libraries/hal_drivers/drv_wdt.c
bsp/bluetrum/libraries/hal_drivers/drv_wdt.c
+1
-1
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_adc.h
...aries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_adc.h
+6
-6
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_gpio.h
...ries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_gpio.h
+1
-1
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_gpio_ex.h
...s/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_gpio_ex.h
+6
-6
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_uart.h
...ries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_uart.h
+3
-3
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal_gpio.c
...aries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal_gpio.c
+3
-3
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal_sd.c
...braries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal_sd.c
+3
-3
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal_uart.c
...aries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal_uart.c
+16
-16
bsp/bluetrum/libraries/hal_libraries/bmsis/include/ab32vg1.h
bsp/bluetrum/libraries/hal_libraries/bmsis/include/ab32vg1.h
+7
-7
未找到文件。
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
@@ -65,16 +65,16 @@ void timer0_isr(int vector, void *param)
void
timer0_init
(
void
)
{
TMR0CON
=
BIT
(
7
);
//TIE
TMR0CNT
=
0
;
TMR0CON
=
BIT
(
7
);
//TIE
TMR0CNT
=
0
;
rt_hw_interrupt_install
(
IRQ_TMR0_VECTOR
,
timer0_isr
,
RT_NULL
,
"tick"
);
rt_hw_interrupt_install
(
IRQ_TMR0_VECTOR
,
timer0_isr
,
RT_NULL
,
"tick"
);
}
void
timer0_cfg
(
uint32_t
ticks
)
{
TMR0PR
=
(
uint32_t
)(
ticks
-
1UL
);
//1ms interrupt
TMR0CON
|=
BIT
(
0
);
// EN
TMR0PR
=
(
uint32_t
)(
ticks
-
1UL
);
//1ms interrupt
TMR0CON
|=
BIT
(
0
);
// EN
}
void
hal_mdelay
(
uint32_t
ms
)
...
...
bsp/bluetrum/ab32vg1-ab-prougen/board/board.h
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/ab32vg1-ab-prougen/board/ports/audio/drv_sound.c
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Date Author Notes
...
...
@@ -139,7 +139,7 @@ void saia_volume_set(rt_uint8_t volume)
{
if
(
volume
>
100
)
volume
=
100
;
uint32_t
dvol
=
volume
*
327
;
// max is 0x7ffff
LOG_D
(
"dvol=0x%x"
,
dvol
);
DACVOLCON
=
dvol
|
(
0x02
<<
16
);
// dac fade in
...
...
@@ -155,7 +155,7 @@ static rt_err_t sound_getcaps(struct rt_audio_device *audio, struct rt_audio_cap
rt_err_t
result
=
RT_EOK
;
struct
sound_device
*
snd_dev
=
RT_NULL
;
RT_ASSERT
(
audio
!=
RT_NULL
);
RT_ASSERT
(
audio
!=
RT_NULL
);
snd_dev
=
(
struct
sound_device
*
)
audio
->
parent
.
user_data
;
switch
(
caps
->
main_type
)
...
...
@@ -231,7 +231,7 @@ static rt_err_t sound_getcaps(struct rt_audio_device *audio, struct rt_audio_cap
break
;
}
return
RT_EOK
;
return
RT_EOK
;
}
static
rt_err_t
sound_configure
(
struct
rt_audio_device
*
audio
,
struct
rt_audio_caps
*
caps
)
...
...
@@ -320,14 +320,14 @@ static rt_err_t sound_configure(struct rt_audio_device *audio, struct rt_audio_c
break
;
}
return
RT_EOK
;
return
RT_EOK
;
}
static
rt_err_t
sound_init
(
struct
rt_audio_device
*
audio
)
{
struct
sound_device
*
snd_dev
=
RT_NULL
;
RT_ASSERT
(
audio
!=
RT_NULL
);
RT_ASSERT
(
audio
!=
RT_NULL
);
snd_dev
=
(
struct
sound_device
*
)
audio
->
parent
.
user_data
;
adpll_init
(
0
);
...
...
@@ -337,14 +337,14 @@ static rt_err_t sound_init(struct rt_audio_device *audio)
saia_frequency_set
(
snd_dev
->
replay_config
.
samplerate
);
saia_channels_set
(
snd_dev
->
replay_config
.
channels
);
return
RT_EOK
;
return
RT_EOK
;
}
static
rt_err_t
sound_start
(
struct
rt_audio_device
*
audio
,
int
stream
)
{
struct
sound_device
*
snd_dev
=
RT_NULL
;
RT_ASSERT
(
audio
!=
RT_NULL
);
RT_ASSERT
(
audio
!=
RT_NULL
);
snd_dev
=
(
struct
sound_device
*
)
audio
->
parent
.
user_data
;
if
(
stream
==
AUDIO_STREAM_REPLAY
)
...
...
@@ -369,8 +369,8 @@ static rt_err_t sound_stop(struct rt_audio_device *audio, int stream)
{
struct
sound_device
*
snd_dev
=
RT_NULL
;
RT_ASSERT
(
audio
!=
RT_NULL
);
snd_dev
=
(
struct
sound_device
*
)
audio
->
parent
.
user_data
;
RT_ASSERT
(
audio
!=
RT_NULL
);
snd_dev
=
(
struct
sound_device
*
)
audio
->
parent
.
user_data
;
if
(
stream
==
AUDIO_STREAM_REPLAY
)
{
...
...
@@ -387,7 +387,7 @@ rt_size_t sound_transmit(struct rt_audio_device *audio, const void *writeBuf, vo
rt_size_t
tmp_size
=
size
/
4
;
rt_size_t
count
=
0
;
RT_ASSERT
(
audio
!=
RT_NULL
);
RT_ASSERT
(
audio
!=
RT_NULL
);
snd_dev
=
(
struct
sound_device
*
)
audio
->
parent
.
user_data
;
while
(
tmp_size
--
>
0
)
{
...
...
@@ -395,14 +395,14 @@ rt_size_t sound_transmit(struct rt_audio_device *audio, const void *writeBuf, vo
AUBUFDATA
=
((
const
uint32_t
*
)
writeBuf
)[
count
++
];
}
return
size
;
return
size
;
}
static
void
sound_buffer_info
(
struct
rt_audio_device
*
audio
,
struct
rt_audio_buf_info
*
info
)
{
struct
sound_device
*
snd_dev
=
RT_NULL
;
RT_ASSERT
(
audio
!=
RT_NULL
);
RT_ASSERT
(
audio
!=
RT_NULL
);
snd_dev
=
(
struct
sound_device
*
)
audio
->
parent
.
user_data
;
/**
...
...
@@ -425,7 +425,7 @@ static struct rt_audio_ops ops =
.
init
=
sound_init
,
.
start
=
sound_start
,
.
stop
=
sound_stop
,
.
transmit
=
sound_transmit
,
.
transmit
=
sound_transmit
,
.
buffer_info
=
sound_buffer_info
,
};
...
...
@@ -443,11 +443,11 @@ void audio_isr(int vector, void *param)
static
int
rt_hw_sound_init
(
void
)
{
rt_uint8_t
*
tx_fifo
=
RT_NULL
;
rt_uint8_t
*
rx_fifo
=
RT_NULL
;
rt_uint8_t
*
tx_fifo
=
RT_NULL
;
rt_uint8_t
*
rx_fifo
=
RT_NULL
;
/* 分配 DMA 搬运 buffer */
tx_fifo
=
rt_calloc
(
1
,
TX_FIFO_SIZE
);
/* 分配 DMA 搬运 buffer */
tx_fifo
=
rt_calloc
(
1
,
TX_FIFO_SIZE
);
if
(
tx_fifo
==
RT_NULL
)
{
return
-
RT_ENOMEM
;
...
...
@@ -455,8 +455,8 @@ static int rt_hw_sound_init(void)
snd_dev
.
tx_fifo
=
tx_fifo
;
/* 分配 DMA 搬运 buffer */
rx_fifo
=
rt_calloc
(
1
,
TX_FIFO_SIZE
);
/* 分配 DMA 搬运 buffer */
rx_fifo
=
rt_calloc
(
1
,
TX_FIFO_SIZE
);
if
(
rx_fifo
==
RT_NULL
)
{
return
-
RT_ENOMEM
;
...
...
bsp/bluetrum/libcpu/cpu/cpuport.c
浏览文件 @
f18dfa08
...
...
@@ -41,9 +41,9 @@ rt_uint8_t *rt_hw_stack_init(void *tentry,
stk
--
;
*
stk
=
(
rt_uint32_t
)
0x10003
;
/* Start address */
stk
--
;
*
stk
=
(
rt_uint32_t
)
tentry
;
/* Start address */
*
stk
=
(
rt_uint32_t
)
tentry
;
/* Start address */
stk
-=
22
;
*
stk
=
(
rt_uint32_t
)
parameter
;
/* Register a0 parameter*/
*
stk
=
(
rt_uint32_t
)
parameter
;
/* Register a0 parameter*/
stk
-=
6
;
*
stk
=
(
rt_uint32_t
)
tp
;
/* Register thread pointer */
stk
--
;
...
...
bsp/bluetrum/libcpu/cpu/interrupt.c
浏览文件 @
f18dfa08
...
...
@@ -24,16 +24,16 @@ void set_cpu_irq_comm(void (*irq_hook)(void))
void
cpu_irq_comm_do
(
void
)
{
void
(
*
pfnct
)(
void
);
void
(
*
pfnct
)(
void
);
uint32_t
irq_pend
=
PICPND
&
irq_mask
;
for
(
int
i
=
0
;
i
<
IRQ_TOTAL_NUM
;
i
++
)
{
for
(
int
i
=
0
;
i
<
IRQ_TOTAL_NUM
;
i
++
)
{
if
(
irq_pend
&
BIT
(
i
))
{
pfnct
=
tbl_irq_vector
[
i
];
if
(
pfnct
)
{
pfnct
();
/* call ISR */
pfnct
();
/* call ISR */
}
}
}
}
}
void
rt_hw_irq_enable
(
int
vector
)
...
...
@@ -56,12 +56,12 @@ void rt_hw_interrupt_init(void)
/**
* @brief This function will install a interrupt service routine to a interrupt.
*
* @param vector
* @param handler
* @param param
* @param name
* @return rt_isr_handler_t
*
* @param vector
* @param handler
* @param param
* @param name
* @return rt_isr_handler_t
*/
rt_isr_handler_t
rt_hw_interrupt_install
(
int
vector
,
rt_isr_handler_t
handler
,
...
...
bsp/bluetrum/libraries/hal_drivers/config/adc_config.h
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/config/tim_config.h
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_adc.c
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
@@ -45,7 +45,7 @@ static rt_err_t ab32_adc_enabled(struct rt_adc_device *device, rt_uint32_t chann
{
RT_ASSERT
(
device
!=
RT_NULL
);
hal_adc_enable
(
enabled
);
hal_adc_enable
(
enabled
);
return
RT_EOK
;
}
...
...
@@ -53,7 +53,7 @@ static rt_err_t ab32_adc_enabled(struct rt_adc_device *device, rt_uint32_t chann
static
rt_uint32_t
ab32_adc_get_channel
(
rt_uint32_t
channel
)
{
rt_uint32_t
ab32_channel
=
0
;
switch
(
channel
)
{
case
0
:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_common.h
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_gpio.c
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_gpio.h
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_hwtimer.c
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_log.h
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_sdio.c
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_sdio.h
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_soft_i2c.c
浏览文件 @
f18dfa08
...
...
@@ -235,8 +235,8 @@ int rt_hw_i2c_init(void)
ab32_i2c_bus_unlock
(
&
soft_i2c_config
[
i
]);
LOG_D
(
"software simulation %s init done, pin scl: %d, pin sda %d"
,
soft_i2c_config
[
i
].
bus_name
,
soft_i2c_config
[
i
].
scl
,
soft_i2c_config
[
i
].
bus_name
,
soft_i2c_config
[
i
].
scl
,
soft_i2c_config
[
i
].
sda
);
}
...
...
bsp/bluetrum/libraries/hal_drivers/drv_usart.c
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_usart.h
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_drivers/drv_wdt.c
浏览文件 @
f18dfa08
/*
* Copyright (c) 2020-2021, Bluetrum Development Team
*
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
...
...
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_adc.h
浏览文件 @
f18dfa08
...
...
@@ -31,28 +31,28 @@
#define ADC_CHANNEL_15 (1u << 15)
/**
* @}
*
*
*/
/**
* @brief Enable ADC
*
* @param enable
*
* @param enable
*/
void
hal_adc_enable
(
uint8_t
enable
);
/**
* @brief Starts conversion of the channels
*
*
* @param channel @ref ADC_channels
*/
void
hal_adc_start
(
uint32_t
channel
);
/**
* @brief Poll for conversion complete
*
*
* @param timeout Timeout value in millisecond
* @return hal_error_t
* @return hal_error_t
*/
hal_error_t
hal_adc_poll_for_conversion
(
uint32_t
timeout
);
...
...
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_gpio.h
浏览文件 @
f18dfa08
...
...
@@ -13,7 +13,7 @@ struct gpio_init
{
uint8_t
pin
;
uint8_t
dir
;
uint8_t
de
;
uint8_t
de
;
uint8_t
pull
;
uint32_t
alternate
;
uint32_t
af_con
;
/*!< Alternate function control
...
...
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_gpio_ex.h
浏览文件 @
f18dfa08
...
...
@@ -28,7 +28,7 @@
* G5: tx:PA1 rx:PA0
* G6: tx:PE0 rx:PE1
* G7: tx:PF2 rx:map to tx
*
*
* UART1:
* G1: tx:PA7 rx:PA6
* G2: tx:PA4 rx:PA3
...
...
@@ -52,17 +52,17 @@
* G1: PE7
* G2: PF2
* G3: PA3
*
*
* LPWM2:
* G1: PE6
* G2: PE0
* G3: PA2
*
*
* LPWM1:
* G1: PE5
* G2: PB4
* G3: PA1
*
*
* LPWM0:
* G1: PE4
* G2: PB3
...
...
@@ -76,10 +76,10 @@
/**
* TMR5:
* G1: PE1 PE2 PE3
*
*
* TMR4:
* G1: PA5 PA6 PA7
*
*
* TMR3:
* G1: PB0 PB1 PB2
*/
...
...
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/include/ab32vg1_hal_uart.h
浏览文件 @
f18dfa08
...
...
@@ -39,7 +39,7 @@ struct uart_init
/**
* @brief UART handle struction definition
*
*
*/
struct
uart_handle
{
...
...
@@ -76,8 +76,8 @@ struct uart_handle
/** @defgroup UART_Mode UART Transfer Mode
* @{
*/
#define UART_MODE_TX (0x00u)
/*!< TX mode */
#define UART_MODE_TX_RX (0x01u)
/*!< RX and TX mode */
#define UART_MODE_TX (0x00u)
/*!< TX mode */
#define UART_MODE_TX_RX (0x01u)
/*!< RX and TX mode */
/**
* @}
...
...
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal_gpio.c
浏览文件 @
f18dfa08
...
...
@@ -105,7 +105,7 @@ void hal_gpio_init(hal_sfr_t gpiox, gpio_init_t gpio_init)
/**
* @brief Read the specified input port pin.
*
*
* @param port GPIO port(GPIOAN, GPIOBN, GPIOEN, GPIOFN).
* @param pin This parameter can be GPIO_PIN_x where x can be (0.15).
* @return uint8_t The input port pin value.
...
...
@@ -117,7 +117,7 @@ uint8_t hal_gpio_read(hal_sfr_t gpiox, uint8_t pin)
/**
* @brief Set or clear the selected data port bit.
*
*
* @param port GPIO port(GPIOAN, GPIOBN, GPIOEN, GPIOFN).
* @param pin This parameter can be GPIO_PIN_x where x can be (0.15).
* @param state specifies the value to be written to the selected bit.
...
...
@@ -135,7 +135,7 @@ void hal_gpio_write(hal_sfr_t gpiox, uint8_t pin, uint8_t state)
/**
* @brief Toggle the specified GPIO pin.
*
*
* @param port GPIO port(GPIOAN, GPIOBN, GPIOEN, GPIOFN).
* @param pin This parameter can be GPIO_PIN_x where x can be (0.15).
*/
...
...
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal_sd.c
浏览文件 @
f18dfa08
...
...
@@ -232,7 +232,7 @@ static bool sd_go_ready_try(sd_handle_t hsd)
case
CARD_V1
:
sdmmc_acmd_op_cond
(
hsd
,
0x00ff8000
);
break
;
case
CARD_V2
:
sdmmc_acmd_op_cond
(
hsd
,
0x40ff8000
);
break
;
...
...
@@ -389,8 +389,8 @@ bool hal_sd_read(sd_handle_t hsd, void *buf, uint32_t lba)
return
true
;
}
}
hsd
->
sdcard
.
state
=
HAL_SD_STATE_INVAL
;
hsd
->
sdcard
.
state
=
HAL_SD_STATE_INVAL
;
hal_mdelay
(
20
);
}
...
...
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/source/ab32vg1_hal_uart.c
浏览文件 @
f18dfa08
...
...
@@ -18,7 +18,7 @@ enum
/**
* @brief Set the UART baud rate.
*
*
* @param uartx This parameter can be UARTxN where x can be (0.2).
* @param baud Baud rate.
*/
...
...
@@ -33,9 +33,9 @@ void hal_uart_setbaud(hal_sfr_t uartx, uint32_t baud)
/**
* @brief Initialize the UART mode.
*
*
* @param huart UART handle.
* @return hal_error_t
* @return hal_error_t
*/
hal_error_t
hal_uart_init
(
struct
uart_handle
*
huart
)
{
...
...
@@ -51,7 +51,7 @@ hal_error_t hal_uart_init(struct uart_handle *huart)
/**
* @brief DeInitialize the UART peripheral.
*
*
* @param uartx This parameter can be UARTxN where x can be (0.2).
*/
void
hal_uart_deinit
(
hal_sfr_t
uartx
)
...
...
@@ -61,7 +61,7 @@ void hal_uart_deinit(hal_sfr_t uartx)
/**
* @brief Initialize the UART MSP.
*
*
* @param huart UART handle.
*/
WEAK
void
HAL_UART_MspInit
(
struct
uart_handle
*
huart
)
...
...
@@ -69,9 +69,9 @@ WEAK void HAL_UART_MspInit(struct uart_handle *huart)
/**
* @brief Control the UART peripheral.
*
*
* @param uartx This parameter can be UARTxN where x can be (0.2).
* @param cntl
* @param cntl
* @arg UART_MODULE_ENABLE
* @arg UART_BIT9_ENABLE
* @arg UART_RXIT_ENABLE
...
...
@@ -80,7 +80,7 @@ WEAK void HAL_UART_MspInit(struct uart_handle *huart)
* @arg UART_CLK_SRC1
* @arg UART_1LINE_ENABLE
* @arg UART_RX_ENABLE
* @param param
* @param param
* @arg HAL_DISABLE
* @arg HAL_ENABLE
*/
...
...
@@ -95,7 +95,7 @@ void hal_uart_control(hal_sfr_t uartx, uint32_t cntl, uint32_t param)
/**
* @brief Send a character
*
*
* @param uartx This parameter can be UARTxN where x can be (0.2).
* @param data The characters that need to be sent
*/
...
...
@@ -106,7 +106,7 @@ void hal_uart_write(hal_sfr_t uartx, uint8_t data)
/**
* @brief Receive a character.
*
*
* @param uartx This parameter can be UARTxN where x can be (0.2).
* @return uint8_t Received character.
*/
...
...
@@ -117,12 +117,12 @@ uint8_t hal_uart_read(hal_sfr_t uartx)
/**
* @brief Get the UART flag.
*
*
* @param uartx This parameter can be UARTxN where x can be (0.2).
* @param flag
* @param flag
* @arg UART_FLAG_RXPND
* @arg UART_FLAG_TXPND
* @return uint32_t
* @return uint32_t
*/
uint32_t
hal_uart_getflag
(
hal_sfr_t
uartx
,
uint32_t
flag
)
{
...
...
@@ -132,9 +132,9 @@ uint32_t hal_uart_getflag(hal_sfr_t uartx, uint32_t flag)
/**
* @brief Clear the UART flag.
*
*
* @param uartx This parameter can be UARTxN where x can be (0.2).
* @param flag
* @param flag
* @arg UART_FLAG_RXPND
* @arg UART_FLAG_TXPND
*/
...
...
@@ -145,7 +145,7 @@ void hal_uart_clrflag(hal_sfr_t uartx, uint32_t flag)
/**
* @brief Configure the UART peripheral.
*
*
* @param huart UART handle.
*/
void
uart_config_all
(
struct
uart_handle
*
huart
)
...
...
bsp/bluetrum/libraries/hal_libraries/bmsis/include/ab32vg1.h
浏览文件 @
f18dfa08
...
...
@@ -17,18 +17,18 @@ typedef enum
IRQ_SW_VECTOR
=
2
,
IRQ_TMR0_VECTOR
=
3
,
IRQ_TMR1_VECTOR
=
4
,
IRQ_TMR2_4_5_VECTOR
=
5
,
/*!< Timer 2, 4 and 5 Interrupt
*/
IRQ_IRRX_VECTOR
=
6
,
/*!< Timer 3 and IR receiver Interrupt
*/
IRQ_TMR2_4_5_VECTOR
=
5
,
/*!< Timer 2, 4 and 5 Interrupt
*/
IRQ_IRRX_VECTOR
=
6
,
/*!< Timer 3 and IR receiver Interrupt
*/
IRQ_USB_VECTOR
=
7
,
IRQ_SD_VECTOR
=
8
,
IRQ_AUBUF0_1_VECTOR
=
9
,
/*!< Audio buffer 0 and 1 Interrupt
*/
IRQ_AUBUF0_1_VECTOR
=
9
,
/*!< Audio buffer 0 and 1 Interrupt
*/
IRQ_SDADC_VECTOR
=
10
,
IRQ_AUDEC_VECTOR
=
11
,
/*!< Audio codec, SBC encode and AEC FFT Interrupt */
IRQ_SRC_VECTOR
=
12
,
/*!< SRC, PLC and CVSD Interrupt
*/
IRQ_FM_SPDIF_VECTOR
=
13
,
/*!< FM TX, RX and SPDIF RX Interrupt
*/
IRQ_UART0_2_VECTOR
=
14
,
/*!< UART 0 to 2 Interrupt
*/
IRQ_SRC_VECTOR
=
12
,
/*!< SRC, PLC and CVSD Interrupt
*/
IRQ_FM_SPDIF_VECTOR
=
13
,
/*!< FM TX, RX and SPDIF RX Interrupt
*/
IRQ_UART0_2_VECTOR
=
14
,
/*!< UART 0 to 2 Interrupt
*/
IRQ_HSUART_VECTOR
=
15
,
IRQ_RTC_VECTOR
=
16
,
/*!< RTC, LVD and WDT Interrupt
*/
IRQ_RTC_VECTOR
=
16
,
/*!< RTC, LVD and WDT Interrupt
*/
IRQ_I2S_VECTOR
=
17
,
IRQ_TOTAL_NUM
=
23
,
}
irq_type
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录