Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AirborneEngineering/blethrs
/ functions
Functions
81 in github.com/AirborneEngineering/blethrs
⨍
Functions
81
◇
Types & classes
14
↓ 9 callers
Function
send_status
Send a status word back at the start of a response
src/network.rs:34
↓ 6 callers
Function
interact
(hostname, port, command, timeout=2)
blethrs.py:86
↓ 5 callers
Method
available
Return true if the RDes is not currently owned by the DMA
src/ethernet.rs:48
↓ 4 callers
Method
smi_read
Read a register over SMI.
src/ethernet.rs:325
↓ 3 callers
Function
check_address_valid
Check if address+length is valid for read/write flash.
src/flash.rs:139
↓ 3 callers
Function
lock
Lock flash
src/flash.rs:194
↓ 3 callers
Function
read_adr_len
Read an address and length from the socket
src/network.rs:23
↓ 2 callers
Method
buf_as_slice_mut
Access the buffer pointed to by this descriptor
src/ethernet.rs:63
↓ 2 callers
Function
check_length_valid
Check length is a multiple of 4 and no greater than 1024
src/flash.rs:150
↓ 2 callers
Function
clear_flag
()
src/bootload.rs:28
↓ 2 callers
Function
erase_cmd
(hostname, port, address, length)
blethrs.py:109
↓ 2 callers
Function
get_flash_peripheral
Try to get the FLASH peripheral
src/flash.rs:170
↓ 2 callers
Function
init
Call to move the flash peripheral into this module
src/flash.rs:16
↓ 2 callers
Method
next
Return the next available TDes if any are available, otherwise None
src/ethernet.rs:104
↓ 2 callers
Method
ptr
Return the address of the start of the TDes ring
src/ethernet.rs:94
↓ 2 callers
Function
read_cmd
(hostname, port, address, length)
blethrs.py:114
↓ 2 callers
Method
release
Release this RDes back to DMA engine for transmission
src/ethernet.rs:53
↓ 2 callers
Method
set_end_of_ring
Mark this TDes as end-of-ring.
src/ethernet.rs:43
↓ 2 callers
Method
smi_write
Write a register over SMI.
src/ethernet.rs:342
↓ 2 callers
Function
tqdm
(x, *args, **kwargs)
blethrs.py:14
↓ 2 callers
Function
unlock
Try to unlock flash
src/flash.rs:178
↓ 2 callers
Function
write
Write to flash. Returns () on success, None on failure. length must be a multiple of 4.
src/flash.rs:267
↓ 2 callers
Function
write_cmd
(hostname, port, address, data)
blethrs.py:119
↓ 1 callers
Method
block_until_link
(&mut self)
src/ethernet.rs:260
↓ 1 callers
Function
boot_cmd
(hostname, port)
blethrs.py:125
↓ 1 callers
Function
boot_request
(hostname, boot_req_port, bootloader_port, n_attempts=10)
blethrs.py:63
↓ 1 callers
Function
bootload
Jump to user code at the given address. Doesn't disable interrupts so only call this right at boot, when no interrupt sources will be enabled.
src/bootload.rs:48
↓ 1 callers
Function
check_length_correct
Check the specified length matches the amount of data available
src/flash.rs:161
↓ 1 callers
Function
check_response
(data)
blethrs.py:97
↓ 1 callers
Function
cmd_boot
(socket: &mut TcpSocket)
src/network.rs:109
↓ 1 callers
Function
cmd_erase
(socket: &mut TcpSocket)
src/network.rs:92
↓ 1 callers
Function
cmd_info
Respond to the information request command with our build information.
src/network.rs:64
↓ 1 callers
Function
cmd_read
(socket: &mut TcpSocket)
src/network.rs:81
↓ 1 callers
Function
cmd_write
(socket: &mut TcpSocket)
src/network.rs:100
↓ 1 callers
Function
configure_gpio
Set up GPIOs for ethernet. You should enable 9 GPIOs used by the ethernet controller. All GPIO clocks are already enabled. This is also a sensible pl
src/config.rs:63
↓ 1 callers
Function
erase
Erase flash sectors that cover the given address and length.
src/flash.rs:199
↓ 1 callers
Function
erase_sector
Erase specified sector
src/flash.rs:219
↓ 1 callers
Function
flag_set
Returns true if the bootload flag is set: RAM 0x2000_0000 == 0xB00110AD Clears the flag before returning, so this answer is only valid once.
src/bootload.rs:20
↓ 1 callers
Method
get
Attempt to read the UserConfig from flash sector 3 at 0x0800_C000. If a valid config cannot be read, the default one is returned instead.
src/flash.rs:100
↓ 1 callers
Function
get_hex_id
Read device unique ID, return as array of 24 ASCII hex digits
src/network.rs:40
↓ 1 callers
Function
info_cmd
(hostname, port)
blethrs.py:104
↓ 1 callers
Method
init
Initialises this TDes to point at the given buffer.
src/ethernet.rs:33
↓ 1 callers
Method
init_peripherals
Sets up the device peripherals.
src/ethernet.rs:279
↓ 1 callers
Method
link_established
(&mut self)
src/ethernet.rs:256
↓ 1 callers
Function
main
()
blethrs.py:208
↓ 1 callers
Method
phy_init
Command connected PHY to initialise.
src/ethernet.rs:364
↓ 1 callers
Method
phy_poll_link
Poll PHY to determine link status.
src/ethernet.rs:369
↓ 1 callers
Method
phy_reset
Reset the connected PHY and wait for it to come out of reset.
src/ethernet.rs:358
↓ 1 callers
Function
poll
Poll network stack. Arrange for this function to be called frequently.
src/network.rs:183
↓ 1 callers
Function
rcc_init
Set up PLL to 168MHz from 16MHz HSI
src/main.rs:62
↓ 1 callers
Function
read
Read from flash. Returns a &[u8] if the address and length are valid. length must be a multiple of 4.
src/flash.rs:255
↓ 1 callers
Function
reset_bootload
Trigger a reset that will cause us to bootload the user application next go around
src/bootload.rs:35
↓ 1 callers
Method
resume_rx_dma
Resume suspended RX DMA operation
src/ethernet.rs:272
↓ 1 callers
Method
resume_tx_dma
Resume suspended TX DMA operation
src/ethernet.rs:265
↓ 1 callers
Function
schedule_reset
Reset after some ms delay.
src/main.rs:237
↓ 1 callers
Method
set_length
Set the length of data in the buffer pointed to by this TDes
src/ethernet.rs:58
↓ 1 callers
Function
should_enter_bootloader
This function should return true if the bootloader should enter bootload mode, or false to immediately chainload the user firmware. By default we che
src/config.rs:35
↓ 1 callers
Function
systick_init
Set up the systick to provide a 1ms timebase
src/main.rs:140
↓ 1 callers
Function
valid_user_code
Try to determine if there is valid code in the user flash at 0x0801_0000. Returns Some(u32) with the address to jump to if so, and None if not.
src/flash.rs:129
↓ 1 callers
Function
was_software_reset
Returns true if the most recent reset was due to a software request Clears the reset cause before returning, so this answer is only valid once.
src/bootload.rs:11
↓ 1 callers
Function
write_config
(hostname, port, address, mac, ip, gw, prefix)
blethrs.py:164
↓ 1 callers
Function
write_file
(hostname, port, chunk_size, address, data)
blethrs.py:130
↓ 1 callers
Method
write_to_semihosting
(&self)
src/flash.rs:35
Function
DefaultHandler
(irqn: i16)
src/main.rs:250
Function
HardFault
(ef: &cortex_m_rt::ExceptionFrame)
src/main.rs:245
Function
SysTick
()
src/main.rs:223
Method
__init__
(self, errno)
blethrs.py:42
Method
__init__
(self, addr, tx, rx)
blethrs.py:53
Method
__str__
(self)
blethrs.py:45
Method
__str__
(self)
blethrs.py:58
Method
capabilities
(&self)
src/ethernet.rs:439
Method
consume
(self, _timestamp: Instant, len: usize, f: F)
src/ethernet.rs:399
Function
init
Initialise the static NETWORK. Sets up the required EthernetInterface and sockets. Do not call more than once or this function will panic.
src/network.rs:152
Function
main
()
build.rs:8
Function
main
()
src/main.rs:149
Method
new
Create a new uninitialised EthernetDevice. You must move in ETH_MAC, ETH_DMA, and they are then kept by the device. You may only call this function
src/ethernet.rs:229
Method
receive
(&mut self)
src/ethernet.rs:446
Method
transmit
(&mut self)
src/ethernet.rs:454
Function
u8_to_hex
(x: u8, buf: &mut [u8])
src/flash.rs:74
Method
write_char
(&mut self, c: char)
src/flash.rs:65
Method
write_str
(&mut self, s: &str)
src/flash.rs:69