Skip to content

Commit c5d56de

Browse files
oxlmmessigogogo
authored andcommitted
野火启明6m5驱动完善
1 parent 9c6fe80 commit c5d56de

File tree

4 files changed

+127
-2
lines changed

4 files changed

+127
-2
lines changed

bsp/renesas/ebf_qi_min_6m5/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
| GPIO | 支持 | |
3535
| I2C | 支持 | |
3636
| SPI | 支持 | |
37+
| DAC | 支持 | |
38+
| ADC | 支持 | |
39+
| PWM | 支持 | |
40+
| SPI | 支持 | |
3741
| 持续更新中... | | |
3842
| **外接外设** | **支持情况** | **备注** |
3943
| 持续更新中... | | |

bsp/renesas/ebf_qi_min_6m5/board/Kconfig

+119-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,38 @@ menu "Hardware Drivers Config"
2121
select RT_USING_SERIAL
2222
select RT_USING_SERIAL_V2
2323
if BSP_USING_UART
24+
menuconfig BSP_USING_UART2
25+
bool "Enable UART2"
26+
default n
27+
if BSP_USING_UART2
28+
config BSP_UART2_RX_USING_DMA
29+
bool "Enable UART2 RX DMA"
30+
depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
31+
default n
32+
33+
config BSP_UART2_TX_USING_DMA
34+
bool "Enable UART2 TX DMA"
35+
depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
36+
default n
37+
38+
config BSP_UART2_RX_BUFSIZE
39+
int "Set UART2 RX buffer size"
40+
range 64 65535
41+
depends on RT_USING_SERIAL_V2
42+
default 256
43+
44+
config BSP_UART2_TX_BUFSIZE
45+
int "Set UART2 TX buffer size"
46+
range 0 65535
47+
depends on RT_USING_SERIAL_V2
48+
default 0
49+
endif
50+
2451
menuconfig BSP_USING_UART4
2552
bool "Enable UART4"
2653
default n
2754
if BSP_USING_UART4
28-
config BSP_UART0_RX_USING_DMA
55+
config BSP_UART4_RX_USING_DMA
2956
bool "Enable UART4 RX DMA"
3057
depends on BSP_USING_UART4 && RT_SERIAL_USING_DMA
3158
default n
@@ -51,11 +78,15 @@ menu "Hardware Drivers Config"
5178

5279
menuconfig BSP_USING_HW_I2C
5380
bool "Enable hardware I2C BUS"
81+
select RT_USING_I2C
5482
default n
5583
if BSP_USING_HW_I2C
5684
config BSP_USING_HW_I2C1
5785
bool "Enable Hardware I2C1 BUS"
5886
default n
87+
config BSP_USING_HW_I2C2
88+
bool "Enable Hardware I2C2 BUS"
89+
default n
5990
endif
6091

6192
menuconfig BSP_USING_SOFT_I2C
@@ -430,6 +461,93 @@ menu "Hardware Drivers Config"
430461
endif
431462
endif
432463

464+
menuconfig BSP_USING_ADC
465+
bool "Enable ADC"
466+
default n
467+
select RT_USING_ADC
468+
if BSP_USING_ADC
469+
config BSP_USING_ADC0
470+
bool "Enable ADC0"
471+
default n
472+
473+
config BSP_USING_ADC1
474+
bool "Enable ADC1"
475+
default n
476+
endif
477+
478+
menuconfig BSP_USING_DAC
479+
bool "Enable DAC"
480+
default n
481+
select RT_USING_DAC
482+
if BSP_USING_DAC
483+
config BSP_USING_DAC0
484+
bool "Enable DAC0"
485+
default n
486+
487+
config BSP_USING_DAC1
488+
bool "Enable DAC1"
489+
default n
490+
endif
491+
492+
menuconfig BSP_USING_PWM
493+
bool "Enable PWM"
494+
default n
495+
select RT_USING_PWM
496+
if BSP_USING_PWM
497+
config BSP_USING_PWM0
498+
bool "Enable GPT0 (32-Bits) output PWM"
499+
default n
500+
501+
config BSP_USING_PWM1
502+
bool "Enable GPT1 (32-Bits) output PWM"
503+
default n
504+
505+
config BSP_USING_PWM2
506+
bool "Enable GPT2 (32-Bits) output PWM"
507+
default n
508+
509+
config BSP_USING_PWM3
510+
bool "Enable GPT3 (32-Bits) output PWM"
511+
default n
512+
513+
config BSP_USING_PWM4
514+
bool "Enable GPT4 (16-Bits) output PWM"
515+
default n
516+
517+
config BSP_USING_PWM5
518+
bool "Enable GPT5 (16-Bits) output PWM"
519+
default n
520+
521+
config BSP_USING_PWM6
522+
bool "Enable GPT6 (16-Bits) output PWM"
523+
default n
524+
525+
config BSP_USING_PWM7
526+
bool "Enable GPT7 (16-Bits) output PWM"
527+
default n
528+
529+
config BSP_USING_PWM8
530+
bool "Enable GPT8 (16-Bits) output PWM"
531+
default n
532+
533+
config BSP_USING_PWM9
534+
bool "Enable GPT9 (16-Bits) output PWM"
535+
default n
536+
endif
537+
538+
menuconfig BSP_USING_SPI
539+
bool "Enable SPI BUS"
540+
default n
541+
select RT_USING_SPI
542+
if BSP_USING_SPI
543+
config BSP_USING_SPI0
544+
bool "Enable SPI0 BUS"
545+
default n
546+
config BSP_USING_SPI1
547+
bool "Enable SPI1 BUS"
548+
default n
549+
endif
550+
433551
endmenu
434552

435553
menu "Board extended module Drivers"

bsp/renesas/ebf_qi_min_6m5/template.uvprojx

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
<v6WtE>0</v6WtE>
336336
<v6Rtti>0</v6Rtti>
337337
<VariousControls>
338-
<MiscControls>-Wno-license-management -Wunused -Wuninitialized -Wall -Wextra -Wmissing-declarations -Wconversion -Wpointer-arith -Wshadow -Waggregate-return -Wfloat-equal</MiscControls>
338+
<MiscControls>-Wno-license-management -Wunused -Wuninitialized -Wall -Wmissing-declarations -Wpointer-arith -Waggregate-return -Wfloat-equal</MiscControls>
339339
<Define></Define>
340340
<Undefine></Undefine>
341341
<IncludePath></IncludePath>

bsp/renesas/libraries/HAL_Drivers/drv_i2c.c

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ static struct ra_i2c_handle ra_i2cs[] =
4545
#ifdef BSP_USING_HW_I2C1
4646
{.bus_name = "i2c1", .i2c_cfg = &g_i2c_master1_cfg, .i2c_ctrl = &g_i2c_master1_ctrl,},
4747
#endif
48+
#ifdef BSP_USING_HW_I2C2
49+
{.bus_name = "i2c2", .i2c_cfg = &g_i2c_master2_cfg, .i2c_ctrl = &g_i2c_master2_ctrl,},
50+
#endif
4851
};
4952

5053
void i2c_master_callback(i2c_master_callback_args_t *p_args)

0 commit comments

Comments
 (0)