Skip to content

Commit

Permalink
[bsp/allwinner] feat: porting to RT_USING_DEVICE_OPS
Browse files Browse the repository at this point in the history
This patch ports the codebase to use the RT_USING_DEVICE_OPS structure,
which is required by v5.1.0 Smart kernel, improves modularity and makes
it easier to manage device operations by consolidating them into a
single structure, enhancing maintainability and future scalability.

Changes:
- Added RT_USING_DEVICE_OPS conditionals to partition.c and drv_sdmmc.c.
- Defined rt_device_ops structures for partition and sdmmc drivers.
- Updated device initialization to use the ops structure if defined.
- Replaced direct function calls with rt_dev_control, rt_dev_read, and
  rt_dev_write macros where applicable.
- Removed redundant us_delay function from os.c.

Signed-off-by: Shell <smokewood@qq.com>
  • Loading branch information
polarvid committed Jul 6, 2024
1 parent 755cde3 commit 8e358e3
Show file tree
Hide file tree
Showing 7 changed files with 416 additions and 332 deletions.
Loading

0 comments on commit 8e358e3

Please sign in to comment.