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