-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[bsp][renesas] add EK-RA2E2 other device drivers support #10695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
98307ae
[bsp][renesas]add EK-RA2E2 sci_uart support
tomjielii be44cd9
[bsp][renesas] add EK-RA2E2 (i2c/spi/adc/pwm/flash/gpio interrupt) su…
tomjielii 7d0c89c
Merge remote-tracking branch 'upstream/master'
tomjielii d21375b
[bsp][renesas] comment drv_flash.c and format drv_i2c.c
tomjielii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
bsp/renesas/libraries/HAL_Drivers/drivers/config/ra2e2/adc_config.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
|
|
||
| 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 | ||
|
|
56 changes: 56 additions & 0 deletions
56
bsp/renesas/libraries/HAL_Drivers/drivers/config/ra2e2/pwm_config.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| /* | ||
| * 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_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__ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /* | ||
| * Copyright (c) 2006-2023, RT-Thread Development Team | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| * | ||
| * Change Logs: | ||
| * Date Author Notes | ||
| * 2022-07-20 Sherman the first version | ||
| */ | ||
| #ifndef _FAL_CFG_H_ | ||
| #define _FAL_CFG_H_ | ||
|
|
||
| #include "hal_data.h" | ||
| #include "rtconfig.h" | ||
|
|
||
| extern const struct fal_flash_dev _onchip_flash_lp; | ||
|
|
||
| #define FLASH_START_ADDRESS 0x00000000 | ||
|
|
||
| /* flash device table */ | ||
| #define FAL_FLASH_DEV_TABLE \ | ||
| { \ | ||
| &_onchip_flash_lp, \ | ||
| } | ||
| /* ====================== Partition Configuration ========================== */ | ||
| #ifdef FAL_PART_HAS_TABLE_CFG | ||
| /** partition table, The chip flash partition is defined in "\script\memory_regions.ld". | ||
| * The partition start at 0x440 instead of 0 because OFS0, OFS1 and security MPU registers exist. | ||
| * More details can be found in the RA2E2 Group User Manual: Hardware Figure 6.1. | ||
| * | ||
| * The table is used to define flash partition by struct fal_partition in fal_def.h */ | ||
| #define FAL_PART_TABLE \ | ||
| { \ | ||
| {FAL_PART_MAGIC_WROD, "app", "onchip_flash_lp", 0x440, 0x0000fbc0, 0}, \ | ||
| } | ||
| #endif /* FAL_PART_HAS_TABLE_CFG */ | ||
| #endif /* _FAL_CFG_H_ */ | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
English: Empty callback function should include a comment explaining its purpose or implement basic functionality like setting completion flags. Consider adding parameter validation or basic event handling.
中文: 空的回调函数应该包含注释说明其用途,或实现基本功能如设置完成标志。建议添加参数验证或基本事件处理。