Skip to content

Commit 74bb39e

Browse files
committed
Implement changes after code review
1 parent d0d393a commit 74bb39e

File tree

8 files changed

+8
-25
lines changed

8 files changed

+8
-25
lines changed

.cargo/config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ rustflags = [
1313
[build]
1414
# Pick ONE of these compilation targets
1515
# target = "thumbv6m-none-eabi" # Cortex-M0 and Cortex-M0+
16-
target = "thumbv7m-none-eabi" # Cortex-M3
16+
# target = "thumbv7m-none-eabi" # Cortex-M3
1717
# target = "thumbv7em-none-eabi" # Cortex-M4 and Cortex-M7 (no FPU)
18-
# target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)
18+
target = "thumbv7em-none-eabihf" # Cortex-M4F and Cortex-M7F (with FPU)

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name = "stm32-eth"
44
description = "Embedded Rust Ethernet driver for the STM32 MCU series"
55
license = "Apache-2.0"
66
authors = ["Astro <astro@spaceboyz.net>"]
7-
version = "0.3.0"
7+
version = "0.2.0"
88
keywords = ["ethernet", "eth", "stm32", "stm32f4", "stm32f7"]
99
repository = "https://github.com/stm32-rs/stm32-eth"
1010
documentation = "https://docs.rs/stm32-eth/"

Embed.toml

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Please send pull requests.
1515
```bash
1616
cargo build --example="pktgen" --features="stm32f429"
1717
cargo build --example="ip" --features="stm32f429 smoltcp-phy log smoltcp/socket-tcp smoltcp/socket-icmp smoltcp/log smoltcp/verbose"
18-
cargo build --example="ip-f107" --features="stm32f107 smoltcp-phy log smoltcp/socket-tcp smoltcp/socket-icmp" --release
18+
cargo build --example="ip-f107" --features="stm32f107 smoltcp-phy log smoltcp/socket-tcp smoltcp/socket-icmp smoltcp/log smoltcp/verbose"
1919
```
2020

2121
## Usage

examples/arp-smoltcp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use smoltcp::wire::{
2525
use stm32_eth::{
2626
hal::gpio::{GpioExt, Speed},
2727
hal::rcc::RccExt,
28-
// hal::time::U32Ext,
2928
smi,
3029
stm32::{interrupt, CorePeripherals, Peripherals, SYST},
3130
};

memory.x

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* STM32F429 */
2-
/*
32
MEMORY
43
{
54
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K
@@ -10,11 +9,12 @@ MEMORY
109
}
1110
_stack_start = ORIGIN(RAM) + LENGTH(RAM);
1211
_heap_size = LENGTH(RAM) - 4K;
13-
*/
1412

1513
/* STM32F107 */
14+
/*
1615
MEMORY
1716
{
1817
FLASH : ORIGIN = 0x08000000, LENGTH = 128K
1918
RAM : ORIGIN = 0x20000000, LENGTH = 32K
2019
}
20+
*/

src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,7 @@ impl<'rx, 'tx> Eth<'rx, 'tx> {
177177
// Flow Control Register
178178
self.eth_mac.macfcr.modify(|_, w| {
179179
// Pause time
180-
#[allow(unused_unsafe)]
181-
unsafe {
182-
w.pt().bits(0x100)
183-
}
180+
w.pt().bits(0x100)
184181
});
185182

186183
// operation mode register

src/rx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ impl<'a> RxRing<'a> {
231231
}
232232
self.next_entry = 0;
233233
let ring_ptr = self.entries[0].desc() as *const RxDescriptor;
234+
234235
// Register RxDescriptor
235236
eth_dma
236237
.dmardlar
237-
// Note: unsafe block required for `stm32f107`.
238238
.write(|w| unsafe { w.srl().bits(ring_ptr as u32) });
239239

240240
// We already have fences in `set_owned`, which is called in `setup`

0 commit comments

Comments
 (0)