Skip to content

Commit

Permalink
[Renesas]Modifying some script files (RT-Thread#7445)
Browse files Browse the repository at this point in the history
Co-authored-by: Man, Jianting (Meco) <[email protected]>
  • Loading branch information
Rbb666 and mysterywolf authored May 13, 2023
1 parent acb5010 commit c547cc1
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 17 deletions.
56 changes: 50 additions & 6 deletions bsp/renesas/ra6m3-hmi-board/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,60 @@ menu "Hardware Drivers Config"
default n
endif

if BSP_USING_LVGL
config BSP_USING_LVGL_DEMO
bool "Enable LVGL demo"
select PKG_USING_LV_MUSIC_DEMO
default y
endif
menuconfig BSP_USING_LVGL_DEMO
bool "Enable LVGL demo for LCD"
if BSP_USING_LVGL_DEMO
choice
prompt "choice lvgl demo"
default BSP_USING_LVGL_MUSIC_DEMO

config BSP_USING_LVGL_MUSIC_DEMO
bool "Enable LVGL music demo"
select PKG_USING_LV_MUSIC_DEMO

config BSP_USING_LVGL_VIDEO_DEMO
bool "Enable LVGL video demo"
select BSP_USING_G2D
select BSP_USING_JPEG
endchoice
endif

endmenu

menu "Board extended module Drivers"
menuconfig BSP_USING_RW007
bool "Enable RW007"
default n
select PKG_USING_RW007
select BSP_USING_SCI_SPI
select BSP_USING_SCI_SPI3
select RT_USING_MEMPOOL
select RW007_NOT_USE_EXAMPLE_DRIVERS

if BSP_USING_RW007
config RA_RW007_SPI_BUS_NAME
string "RW007 BUS NAME"
default "scpi3"

config RA_RW007_CS_PIN
hex "(HEX)CS pin index"
default 0x0308

config RA_RW007_BOOT0_PIN
hex "(HEX)BOOT0 pin index (same as spi clk pin)"
default 0x030B

config RA_RW007_BOOT1_PIN
hex "(HEX)BOOT1 pin index (same as spi cs pin)"
default 0x0308

config RA_RW007_INT_BUSY_PIN
hex "(HEX)INT/BUSY pin index"
default 0x000F

config RA_RW007_RST_PIN
hex "(HEX)RESET pin index"
default 0x030C
endif
endmenu
endmenu
2 changes: 1 addition & 1 deletion bsp/renesas/ra6m3-hmi-board/board/lvgl/demo/img/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ for d in list:
if os.path.isfile(os.path.join(path, 'SConscript')):
group = group + SConscript(os.path.join(d, 'SConscript'))

group = group + DefineGroup('LVGL-demo', src, depend = ['BSP_USING_LVGL', 'BSP_USING_LVGL_DEMO'], CPPPATH = CPPPATH)
group = group + DefineGroup('LVGL-demo', src, depend = ['BSP_USING_LVGL', 'BSP_USING_LVGL_VIDEO_DEMO'], CPPPATH = CPPPATH)

Return('group')
6 changes: 6 additions & 0 deletions bsp/renesas/ra6m3-hmi-board/board/lvgl/demo/lv_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@
* 2021-10-17 Meco Man First version
* 2022-05-10 Meco Man improve rt-thread initialization process
*/
#include "rtconfig.h"

void lv_user_gui_init(void)
{
/* display demo; you may replace with your LVGL application at here */
#ifdef BSP_USING_LVGL_VIDEO_DEMO
extern void lv_video_gui_init(void);
lv_video_gui_init();
#elif BSP_USING_LVGL_MUSIC_DEMO
extern void lv_demo_music(void);
lv_demo_music();
#endif
}
2 changes: 1 addition & 1 deletion bsp/renesas/ra6m3-hmi-board/board/ports/audio/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ if rtconfig.PLATFORM in ['gcc', 'armclang']:
elif rtconfig.PLATFORM in ['armcc']:
LOCAL_CFLAGS += ' --c99'

group = DefineGroup('audio', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)
group = DefineGroup('audio', src, depend = ['BSP_USING_LVGL_VIDEO_DEMO'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)

Return('group')
6 changes: 0 additions & 6 deletions bsp/renesas/ra6m3-hmi-board/board/ports/audio/pwm_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ static rt_err_t rb_destroy(ringbuf_handle_t rb)
}

rt_free(rb);
rb = NULL;
return RT_EOK;
}

Expand Down Expand Up @@ -648,10 +647,7 @@ rt_err_t pwm_audio_stop(void)
/**< just disable timer ,keep pwm output to reduce switching nosie */
/**< timer disable interrupt */
int level = rt_hw_interrupt_disable();
//
// R_GPT_Stop(handle->pwm_timer_ctrl);
R_GPT_Stop(handle->gen_timer_ctrl);
//
rt_hw_interrupt_enable(level);

rb_flush(handle->ringbuf); /**< flush ringbuf, avoid play noise */
Expand All @@ -665,10 +661,8 @@ rt_err_t pwm_audio_deinit(void)
RT_ASSERT(handle != NULL);

handle->status = PWM_AUDIO_STATUS_UN_INIT;
//
R_GPT_Close(handle->pwm_timer_ctrl);
R_GPT_Close(handle->gen_timer_ctrl);
//
rt_sem_delete(handle->sem_complete);
rb_destroy(handle->ringbuf);
rt_free(handle);
Expand Down
2 changes: 1 addition & 1 deletion bsp/renesas/ra6m3-hmi-board/board/ports/avi/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ for d in list:
if os.path.isfile(os.path.join(path, 'SConscript')):
group = group + SConscript(os.path.join(d, 'SConscript'))

group = group + DefineGroup('avi', src, depend = [], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)
group = group + DefineGroup('player', src, depend = ['BSP_USING_LVGL_VIDEO_DEMO'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)
Return('group')
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ for d in list:
if os.path.isfile(os.path.join(path, 'SConscript')):
group = group + SConscript(os.path.join(d, 'SConscript'))

group = group + DefineGroup('avi', src, depend = ['BSP_USING_JPEG'], CPPPATH = CPPPATH)
group = group + DefineGroup('player', src, depend = ['BSP_USING_LVGL_VIDEO_DEMO'], CPPPATH = CPPPATH)

Return('group')
2 changes: 1 addition & 1 deletion bsp/renesas/ra6m3-hmi-board/board/ports/gpio_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define RA_IRQ_MAX 16

/* PIN to IRQx table */
#define PIN2IRQX_TABLE \
#define PIN2IRQX_TABLE(pin) \
{ \
switch (pin) \
{ \
Expand Down

0 comments on commit c547cc1

Please sign in to comment.