Compare commits
2 Commits
d4058bd161
...
3cac6c3e37
Author | SHA1 | Date |
---|---|---|
Luca | 3cac6c3e37 | |
Luca | da20d2bcc0 |
|
@ -280,8 +280,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "stm32f0xx-hal"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79544d457fe9a119c6fd02f0a16b8c20f39472b03199aac0a307d871a7015ad8"
|
||||
source = "git+https://github.com/lujoga/stm32f0xx-hal.git?branch=v0.18.0-backports#3984f7e46f574cce122dfdf05353fe9126ac47d6"
|
||||
dependencies = [
|
||||
"bare-metal 1.0.0",
|
||||
"bxcan",
|
||||
|
|
|
@ -9,6 +9,6 @@ edition = "2021"
|
|||
cortex-m = "0.7.7"
|
||||
cortex-m-rt = "0.7.3"
|
||||
panic-halt = "0.2.0"
|
||||
stm32f0xx-hal = { version = "0.18.0", features = ["rt", "stm32f072", "stm32-usbd"] }
|
||||
stm32f0xx-hal = { git = "https://github.com/lujoga/stm32f0xx-hal.git", branch = "v0.18.0-backports", features = ["rt", "stm32f072", "stm32-usbd"] }
|
||||
usb-device = "0.3.2"
|
||||
usbd-hid = "0.7.0"
|
||||
|
|
|
@ -12,6 +12,7 @@ use stm32f0xx_hal as hal;
|
|||
use hal::adc::Adc;
|
||||
use hal::pac::Peripherals;
|
||||
use hal::prelude::*;
|
||||
use hal::pwm;
|
||||
|
||||
use touch::Touch;
|
||||
|
||||
|
@ -45,7 +46,7 @@ fn main() -> ! {
|
|||
mut adc6, // ADC_IN5
|
||||
mut adc5, // ADC_IN6
|
||||
mut adc4, // ADC_IN7
|
||||
pwm6, // TIM1_CH1
|
||||
pwm6_pin, // TIM1_CH1
|
||||
tx, // USART1_TX
|
||||
rx, // USART1_RX
|
||||
usb_dm, // USB_DM
|
||||
|
@ -56,19 +57,19 @@ fn main() -> ! {
|
|||
mut touch4, // PB0
|
||||
mut touch5, // PB1
|
||||
mut touch6, // PB2
|
||||
pwm5, // TIM2_CH2
|
||||
pwm4, // TIM3_CH1
|
||||
pwm3, // TIM3_CH2
|
||||
pwm5_pin, // TIM2_CH2
|
||||
pwm4_pin, // TIM3_CH1
|
||||
pwm3_pin, // TIM3_CH2
|
||||
mut dir2, // PB6
|
||||
mut dir1, // PB7
|
||||
pwm1, // TIM16_CH1
|
||||
pwm2, // TIM17_CH1
|
||||
pwm1_pin, // TIM16_CH1
|
||||
pwm2_pin, // TIM17_CH1
|
||||
mut touch7, // PB10
|
||||
mut touch8, // PB11
|
||||
mut dir8, // PB12
|
||||
mut dir7, // PB13
|
||||
pwm8, // TIM15_CH1
|
||||
pwm7, // TIM15_CH2
|
||||
pwm8_pin, // TIM15_CH1
|
||||
pwm7_pin, // TIM15_CH2
|
||||
mut touch1, // PC13
|
||||
mut touch2, // PC14
|
||||
mut touch3, // PC15
|
||||
|
@ -118,6 +119,13 @@ fn main() -> ! {
|
|||
|
||||
let mut _adc = Adc::new(p.ADC, &mut rcc);
|
||||
|
||||
let mut _pwm1 = pwm::tim16(p.TIM16, pwm1_pin, &mut rcc, 250.khz());
|
||||
let mut _pwm2 = pwm::tim17(p.TIM17, pwm2_pin, &mut rcc, 250.khz());
|
||||
let (mut _pwm4, mut _pwm3) = pwm::tim3(p.TIM3, (pwm4_pin, pwm3_pin), &mut rcc, 250.khz());
|
||||
let mut _pwm5 = pwm::tim2(p.TIM2, pwm5_pin, &mut rcc, 250.khz());
|
||||
let mut _pwm6 = pwm::tim1(p.TIM1, pwm6_pin, &mut rcc, 250.khz());
|
||||
let (mut _pwm8, mut _pwm7) = pwm::tim15(p.TIM15, (pwm8_pin, pwm7_pin), &mut rcc, 250.khz());
|
||||
|
||||
touch.setup();
|
||||
|
||||
loop {}
|
||||
|
|
Loading…
Reference in New Issue