Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/ALL_BSP_COMPILE.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@
"renesas/rzt2m_rsk",
"renesas/rzn2l_rsk",
"renesas/rzn2l_etherkit",
"renesas/ra2a1-ek",
"frdm-k64f",
"xplorer4330/M4"
]
Expand Down Expand Up @@ -501,4 +502,4 @@
]
}
]
}
}
25 changes: 25 additions & 0 deletions bsp/renesas/libraries/HAL_Drivers/config/drv_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Date Author Notes
* 2021-07-29 KyleChan first version
* 2022-12-7 Vandoul ADD ra4m2
* 2025-08-17 CYFS ADD ra2a1
*/

#ifndef __DRV_CONFIG_H__
Expand Down Expand Up @@ -203,6 +204,30 @@ extern "C"
#endif
#endif /* SOC_SERIES_R7FA6E2 */

#if defined(SOC_SERIES_R7FA2A1)
#include "ra2a1/uart_config.h"

#ifdef BSP_USING_ADC
#include "ra2a1/adc_config.h"
#endif

#ifdef BSP_USING_DAC
#include "ra2a1/dac_config.h"
#endif

#ifdef BSP_USING_PWM
#include "ra2a1/pwm_config.h"
#endif

#ifdef BSP_USING_TIM
#include "ra2a1/timer_config.h"
#endif

#ifdef BSP_USING_CAN
#include "ra2a1/can_config.h"
#endif
#endif /* SOC_SERIES_R7FA2A1 */

#ifdef __cplusplus
}
#endif
Expand Down
42 changes: 42 additions & 0 deletions bsp/renesas/libraries/HAL_Drivers/config/ra2a1/adc_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2006-2025, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2025-08-17 CYFS first version
*/

#ifndef __ADC_CONFIG_H__
#define __ADC_CONFIG_H__

#include <rtthread.h>
#include <rtdevice.h>
#include "hal_data.h"
#ifdef __cplusplus
extern "C" {
#endif

#if defined(BSP_USING_ADC0) || defined(BSP_USING_ADC1)

struct rt_adc_dev
{
struct rt_adc_ops ops;
struct rt_adc_device adc_device;
};

struct ra_adc_map
{
const char *device_name;
const adc_cfg_t *g_cfg;
const adc_ctrl_t *g_ctrl;
const adc_channel_cfg_t *g_channel_cfg;
};
#endif
#endif

#ifdef __cplusplus
}
#endif

48 changes: 48 additions & 0 deletions bsp/renesas/libraries/HAL_Drivers/config/ra2a1/can_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (c) 2006-2025, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2025-08-17 CYFS first version
*/

#ifndef __CAN_CONFIG_H__
#define __CAN_CONFIG_H__

#include <rtthread.h>
#include "hal_data.h"

#ifdef __cplusplus
extern "C" {
#endif

#if defined(BSP_USING_CAN0)
#ifndef CAN0_CONFIG
#define CAN0_CONFIG \
{ \
.name = "can0", \
.num_of_mailboxs = CAN_NO_OF_MAILBOXES_g_can0, \
.p_api_ctrl = &g_can0_ctrl, \
.p_cfg = &g_can0_cfg, \
}
#endif /* CAN0_CONFIG */
#endif /* BSP_USING_CAN0 */

#if defined(BSP_USING_CAN1)
#ifndef CAN1_CONFIG
#define CAN1_CONFIG \
{ \
.name = "can1", \
.num_of_mailboxs = CAN_NO_OF_MAILBOXES_g_can1, \
.p_api_ctrl = &g_can1_ctrl, \
.p_cfg = &g_can1_cfg, \
}
#endif /* CAN1_CONFIG */
#endif /* BSP_USING_CAN1 */

#ifdef __cplusplus
}
#endif
#endif
41 changes: 41 additions & 0 deletions bsp/renesas/libraries/HAL_Drivers/config/ra2a1/dac_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2006-2025, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2025-08-17 CYFS first version
*/

#ifndef __DAC_CONFIG_H__
#define __DAC_CONFIG_H__

#include <rtthread.h>
#include <rtdevice.h>
#include "hal_data.h"
#ifdef __cplusplus
extern "C" {
#endif

#ifdef BSP_USING_DAC
struct ra_dac_map
{
char name;
const struct st_dac_cfg *g_cfg;
const struct st_dac_instance_ctrl *g_ctrl;
};

struct ra_dac_dev
{
rt_dac_device_t ra_dac_device_t;
struct ra_dac_map *ra_dac_map_dev;
};
#endif

#endif

#ifdef __cplusplus
}
#endif

68 changes: 68 additions & 0 deletions bsp/renesas/libraries/HAL_Drivers/config/ra2a1/pwm_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (c) 2006-2025, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2025-08-17 CYFS first version
*/
#ifndef __PWM_CONFIG_H__
#define __PWM_CONFIG_H__

#include <rtthread.h>
#include <drv_config.h>
#include "hal_data.h"

#ifdef __cplusplus
extern "C" {
#endif

enum
{
#ifdef BSP_USING_PWM0
BSP_PWM0_INDEX,
#endif
#ifdef BSP_USING_PWM1
BSP_PWM1_INDEX,
#endif
#ifdef BSP_USING_PWM2
BSP_PWM2_INDEX,
#endif
#ifdef BSP_USING_PWM3
BSP_PWM3_INDEX,
#endif
#ifdef BSP_USING_PWM4
BSP_PWM4_INDEX,
#endif
#ifdef BSP_USING_PWM5
BSP_PWM5_INDEX,
#endif
#ifdef BSP_USING_PWM6
BSP_PWM6_INDEX,
#endif
#ifdef BSP_USING_PWM7
BSP_PWM7_INDEX,
#endif
#ifdef BSP_USING_PWM8
BSP_PWM8_INDEX,
#endif
#ifdef BSP_USING_PWM9
BSP_PWM9_INDEX,
#endif
BSP_PWMS_NUM
};

#define PWM_DRV_INITIALIZER(num) \
{ \
.name = "pwm"#num , \
.g_cfg = &g_timer##num##_cfg, \
.g_ctrl = &g_timer##num##_ctrl, \
.g_timer = &g_timer##num, \
}

#ifdef __cplusplus
}
#endif

#endif /* __PWM_CONFIG_H__ */
58 changes: 58 additions & 0 deletions bsp/renesas/libraries/HAL_Drivers/config/ra2a1/uart_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (c) 2006-2025, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2025-08-17 CYFS first version
*/

#ifndef __UART_CONFIG_H__
#define __UART_CONFIG_H__

#include <rtthread.h>
#include "hal_data.h"

#ifdef __cplusplus
extern "C" {
#endif

#if defined(BSP_USING_UART0)
#ifndef UART0_CONFIG
#define UART0_CONFIG \
{ \
.name = "uart0", \
.p_api_ctrl = &g_uart0_ctrl, \
.p_cfg = &g_uart0_cfg, \
}
#endif /* UART0_CONFIG */
#endif /* BSP_USING_UART0 */

#if defined(BSP_USING_UART1)
#ifndef UART1_CONFIG
#define UART1_CONFIG \
{ \
.name = "uart1", \
.p_api_ctrl = &g_uart1_ctrl, \
.p_cfg = &g_uart1_cfg, \
}
#endif /* UART1_CONFIG */
#endif /* BSP_USING_UART1 */

#if defined(BSP_USING_UART9)
#ifndef UART9_CONFIG
#define UART9_CONFIG \
{ \
.name = "uart9", \
.p_api_ctrl = &g_uart9_ctrl, \
.p_cfg = &g_uart9_cfg, \
}
#endif /* UART9_CONFIG */
#endif /* BSP_USING_UART9 */

#ifdef __cplusplus
}
#endif

#endif
6 changes: 6 additions & 0 deletions bsp/renesas/libraries/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,10 @@ config SOC_SERIES_R7FA6E2
bool
select ARCH_ARM_CORTEX_M33
select SOC_FAMILY_RENESAS_RA
default n

config SOC_SERIES_R7FA2A1
bool
select ARCH_ARM_CORTEX_M23
select SOC_FAMILY_RENESAS_RA
default n
2 changes: 2 additions & 0 deletions bsp/renesas/ra2a1-ek/.api_xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ddscApi/>
Loading
Loading