Skip to content

Commit f9bebf4

Browse files
committed
feat(rt): add ledc peripheral in D1 SoC ROM runtime
Signed-off-by: Zhouqi Jiang <[email protected]>
1 parent 21f0626 commit f9bebf4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

allwinner-hal/src/ledc/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
//! LED control (LEDC) peripheral.
22
33
pub mod register;
4+
pub use register::RegisterBlock;

allwinner-rt/src/soc/d1/peripheral.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ pub struct Peripherals {
66
pub gpio: Pads,
77
/// Clock control unit peripheral.
88
pub ccu: CCU,
9+
/// LED control peripheral.
10+
pub ledc: LEDC,
911
/// Universal Asynchronous Receiver/Transmitter 0.
1012
pub uart0: UART0,
1113
/// Common control peripheral of DDR SDRAM.
@@ -31,6 +33,7 @@ impl Peripherals {
3133
Peripherals {
3234
gpio: Pads::__new(),
3335
ccu: CCU { _private: () },
36+
ledc: LEDC { _private: () },
3437
uart0: UART0 { _private: () },
3538
com: COM { _private: () },
3639
phy: PHY { _private: () },
@@ -46,6 +49,8 @@ impl Peripherals {
4649
soc! {
4750
/// General Purpose Input/Output peripheral.
4851
pub struct GPIO => 0x02000000, allwinner_hal::gpio::RegisterBlock;
52+
/// LED control peripheral.
53+
pub struct LEDC => 0x02008000, allwinner_hal::ledc::RegisterBlock;
4954
/// Clock control unit peripheral.
5055
pub struct CCU => 0x02001000, allwinner_hal::ccu::RegisterBlock;
5156
/// Universal Asynchronous Receiver/Transmitter 0.

0 commit comments

Comments
 (0)