Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ch32-rs/ch32-hal
/ functions
Functions
1,020 in github.com/ch32-rs/ch32-hal
⨍
Functions
1,020
◇
Types & classes
313
↓ 354 callers
Function
new
Create a CH32V208 10M MAC+PHY driver for [`embassy-net`](https://crates.io/crates/embassy-net). Returns a `(Runner, Device)` pair. The `Device` is pa
src/eth/v10m/mod.rs:209
↓ 122 callers
Method
into
(self)
src/can/error.rs:52
↓ 86 callers
Function
init
Initialize the HAL with the provided configuration. This returns the peripheral singletons that can be used for creating drivers. This should only b
src/lib.rs:176
↓ 70 callers
Method
index
Get the channel index (0..3)
src/timer/mod.rs:36
↓ 70 callers
Method
read
Read.
src/i2c.rs:644
↓ 58 callers
Method
len
Number of descriptors in the ring.
src/eth/v1/mod.rs:230
↓ 53 callers
Method
read
( &'a mut self, peri_addr: *mut W, buf: &'a mut [W], options: TransferOptions,
src/dma/util.rs:14
↓ 52 callers
Method
set_low
(&mut self)
src/gpio.rs:218
↓ 48 callers
Method
set_as_af_output
(&self, af_type: AFType, speed: Speed)
src/gpio.rs:569
↓ 48 callers
Method
write
Write a PHY register.
src/eth/v1/mod.rs:373
↓ 46 callers
Method
write
(&mut self, buf: &[u8])
src/usbhs/endpoint.rs:190
↓ 44 callers
Method
set_high
(&mut self)
src/gpio.rs:212
↓ 39 callers
Method
write
Write.
src/i2c.rs:636
↓ 33 callers
Method
delay_ms
(&mut self, ms: u32)
src/delay/impl_qingke_v3.rs:41
↓ 32 callers
Method
read
(&mut self, buf: &mut [u8])
src/otg_fs/endpoint.rs:137
↓ 32 callers
Method
write
(&mut self, buf: &[u8])
src/otg_fs/endpoint.rs:81
↓ 30 callers
Method
toggle
(&mut self)
src/gpio.rs:232
↓ 28 callers
Method
blocking_write
Blocking write.
src/i2c.rs:434
↓ 27 callers
Method
read
(&mut self, buf: &mut [u8])
src/usbhs/endpoint.rs:166
↓ 25 callers
Method
set_duty
Set the duty for a given channel. The value ranges from 0 for 0% duty, to [`get_max_duty`](Self::get_max_duty) for 100% duty, both included.
src/timer/simple_pwm.rs:133
↓ 23 callers
Method
cap
The capacity of the ringbuffer
src/dma/ringbuffer.rs:72
↓ 23 callers
Method
set_as_input
(&mut self, pull: Pull)
src/gpio.rs:142
↓ 21 callers
Method
regs_gp16
Get access to the general purpose 16bit timer registers. Note: This works even if the timer is more capable, because registers for the less capable t
src/timer/low_level.rs:335
↓ 19 callers
Method
read
Initiate an asynchronous UART read
src/usart/mod.rs:456
↓ 17 callers
Method
read
(&mut self, buf: &mut [u8])
src/usbd.rs:182
↓ 17 callers
Method
send_command_data
(&mut self, cmd: Instruction, data: &[u8])
examples/ch32v305/src/bin/spi-lcd-st7735-cube.rs:176
↓ 17 callers
Method
send_command_data
(&mut self, cmd: Instruction, data: &[u8])
examples/ch32v203/src/bin/spi-lcd-st7735.rs:172
↓ 17 callers
Method
send_command_data
(&mut self, cmd: Instruction, data: &[u8])
examples/ch32v003/src/bin/spi-lcd-st7735-cube.rs:151
↓ 16 callers
Function
eth
()
src/eth/v1/mod.rs:39
↓ 16 callers
Method
info
(&self)
src/dma/mod.rs:96
↓ 16 callers
Method
send_command_data
(&mut self, cmd: Instruction, data: &[u8])
examples/ch32x035/src/bin/spi-lcd-st7735.rs:174
↓ 15 callers
Method
number
(&self)
src/exti.rs:22
↓ 15 callers
Method
read
Read a PHY register.
src/eth/v1/mod.rs:360
↓ 15 callers
Method
write
(&mut self, buf: &[u8])
src/usbd.rs:191
↓ 14 callers
Method
regs_advanced
Get access to the advanced timer registers.
src/timer/low_level.rs:532
↓ 13 callers
Function
khz
This is a convenience shortcut for [`Hertz::khz`]
src/time.rs:33
↓ 13 callers
Function
on_irq
()
src/exti.rs:103
↓ 13 callers
Method
set_as_disconnected
(&self)
src/gpio.rs:585
↓ 13 callers
Method
setup
(&self, mut requests: vec::Vec<TestCircularTransferRequest>)
src/dma/ringbuffer.rs:440
↓ 13 callers
Method
transfer
Bidirectional transfer, using DMA. This transfers both buffers at the same time, so it is NOT equivalent to `write` followed by `read`. The transfer
src/spi.rs:580
↓ 12 callers
Method
regs_basic
Get access to the Baisc 16bit timer registers. Note: This works even if the timer is more capable, because registers for the less capable timers are
src/timer/low_level.rs:202
↓ 11 callers
Method
block
(&self)
src/gpio.rs:478
↓ 11 callers
Method
enable
Enable this channel.
src/dac.rs:104
↓ 11 callers
Method
get
(&mut self, index: usize)
src/can/filter/bit16.rs:31
↓ 10 callers
Method
addr
(&self)
src/usb/mod.rs:51
↓ 10 callers
Method
convert
(&mut self, channel: &mut impl AdcChannel<T>, sample_time: SampleTime, pga: Pga)
src/adc.rs:181
↓ 10 callers
Method
run
Run the ethernet driver forever. This handles RX, TX, and link state monitoring concurrently.
src/eth/v10m/mod.rs:103
↓ 9 callers
Method
check
(self)
src/lib.rs:56
↓ 9 callers
Method
set_mode_cnf
(&self, mode: vals::Mode, cnf: vals::Cnf)
src/gpio.rs:515
↓ 8 callers
Method
get_max_duty
Get max duty value. This value depends on the configured frequency and the timer's clock rate from RCC.
src/timer/simple_pwm.rs:126
↓ 8 callers
Function
mhz
This is a convenience shortcut for [`Hertz::mhz`]
src/time.rs:38
↓ 8 callers
Method
pos
The current position of the ringbuffer
src/dma/ringbuffer.rs:77
↓ 8 callers
Method
set
(&mut self, id: StandardId, opts: FilterOptions)
src/can/filter/bit16.rs:13
↓ 7 callers
Method
pin
(&self)
src/gpio.rs:596
↓ 7 callers
Method
raw_cnt
(&self)
src/embassy/time_driver_systick.rs:73
↓ 7 callers
Method
send_command
(&mut self, cmd: Instruction)
examples/ch32v305/src/bin/spi-lcd-st7735-cube.rs:166
↓ 7 callers
Method
send_command
(&mut self, cmd: Instruction)
examples/ch32x035/src/bin/spi-lcd-st7735.rs:164
↓ 7 callers
Method
set_word_size
(&mut self, config: word_impl::Config)
src/spi.rs:227
↓ 6 callers
Method
blocking_read
Blocking read.
src/i2c.rs:429
↓ 6 callers
Function
chip_id
()
src/signature.rs:46
↓ 6 callers
Function
clocks
()
src/rcc/mod.rs:31
↓ 6 callers
Function
flush_rx_fifo
(regs: pac::spi::Spi)
src/spi.rs:685
↓ 6 callers
Method
get_complete_count
(&self)
src/dma/ringbuffer.rs:415
↓ 6 callers
Method
init
(&mut self)
examples/ch32v305/src/bin/spi-lcd-st7735-cube.rs:98
↓ 6 callers
Method
is_running
(&self)
src/dma/dma_bdma.rs:240
↓ 6 callers
Method
now
(&self)
src/embassy/time_driver_tim.rs:306
↓ 6 callers
Method
read
SPI read, using DMA.
src/spi.rs:492
↓ 6 callers
Method
read
Read elements from the ring buffer Return a tuple of the length read and the length remaining in the buffer If not all of the elements were read, then
src/dma/dma_bdma.rs:543
↓ 6 callers
Method
send_command
(&mut self, cmd: Instruction)
examples/ch32v203/src/bin/spi-lcd-st7735.rs:162
↓ 6 callers
Method
send_command
(&mut self, cmd: Instruction)
examples/ch32v003/src/bin/spi-lcd-st7735-cube.rs:141
↓ 6 callers
Method
set_as_analog
(&mut self)
src/adc.rs:314
↓ 6 callers
Method
start
Start the timer.
src/timer/low_level.rs:207
↓ 6 callers
Method
write
Write elements from the ring buffer Return a tuple of the length written and the length remaining in the buffer
src/dma/dma_bdma.rs:682
↓ 5 callers
Method
_pin
(&self)
src/gpio.rs:469
↓ 5 callers
Method
available
Returns a mutable slice of the next available TX buffer, or None if DMA owns it.
src/eth/v1/mod.rs:200
↓ 5 callers
Method
copy_from
Copy into the dma buffer at `data_range` from `buf`
src/dma/ringbuffer.rs:363
↓ 5 callers
Method
defuse
Prevent drop handler from running.
src/internal/drop.rs:19
↓ 5 callers
Method
init
(&mut self)
examples/ch32v203/src/bin/spi-lcd-st7735.rs:101
↓ 5 callers
Method
port
(&self)
src/gpio.rs:602
↓ 5 callers
Method
read
(&mut self, offset: u32, bytes: &mut [u8])
src/flash/common.rs:205
↓ 5 callers
Method
read_volatile
(&self, buf: &mut [u8])
src/usb/mod.rs:73
↓ 5 callers
Function
regs_gp16
()
src/embassy/time_driver_tim.rs:112
↓ 5 callers
Method
regs_gp32_unchecked
(&self)
src/timer/low_level.rs:190
↓ 5 callers
Method
send_data
(&mut self, data: &[u8])
examples/ch32v305/src/bin/spi-lcd-st7735-cube.rs:171
↓ 5 callers
Method
send_stop
Sends stop condition after transfer.
src/i2c.rs:1039
↓ 5 callers
Method
set_update_window
(&mut self, x: u16, y: u16, w: u16, h: u16)
examples/ch32v305/src/bin/spi-lcd-st7735-cube.rs:128
↓ 5 callers
Method
smi_write
(&mut self, _phy_addr: u8, reg: u8, val: u16)
src/eth/v10m/mod.rs:335
↓ 5 callers
Method
timeout
(&self)
src/i2c.rs:182
↓ 5 callers
Method
transmit
(&mut self, data: &[u8])
examples/ch32l103/src/bin/usbpd.rs:93
↓ 5 callers
Method
write
(&mut self, offset: u32, bytes: &[u8])
src/flash/common.rs:218
↓ 4 callers
Method
alloc_endpoint
( &mut self, ep_type: EndpointType, ep_addr: Option<EndpointAddress>, max_pack
src/usbd.rs:312
↓ 4 callers
Function
blocking_wait_ready
()
src/flash/v3.rs:82
↓ 4 callers
Method
blocking_write_read
Blocking write, restart, read.
src/i2c.rs:442
↓ 4 callers
Function
configure
( rb: &pac::usart::Usart, config: &Config, pclk_freq: Hertz, enable_tx: bool, enable_rx: b
src/usart/mod.rs:978
↓ 4 callers
Method
copy_to
Copy from the dma buffer at `data_range` into `buf`
src/dma/ringbuffer.rs:222
↓ 4 callers
Method
enable_channel
Enable/disable a channel.
src/timer/low_level.rs:451
↓ 4 callers
Function
invariant
(mut r: regs::Epr)
src/usbd.rs:128
↓ 4 callers
Method
next
(&mut self)
src/exti.rs:127
↓ 4 callers
Method
next_u32
(&mut self)
src/rng.rs:151
↓ 4 callers
Method
port_sel
(&self)
src/usbpd/mod.rs:532
next →
1–100 of 1,020, ranked by callers