pounder: enum for gpio ext pins
This is currently unused but it's better to have enums than a set of assorted constants.master
parent
3616f1fa5a
commit
2368a4f6ed
|
@ -802,7 +802,7 @@ pub fn setup(
|
||||||
let scl = gpiob.pb8.into_alternate_af4().set_open_drain();
|
let scl = gpiob.pb8.into_alternate_af4().set_open_drain();
|
||||||
let i2c1 = device.I2C1.i2c(
|
let i2c1 = device.I2C1.i2c(
|
||||||
(scl, sda),
|
(scl, sda),
|
||||||
100.khz(),
|
400.khz(),
|
||||||
ccdr.peripheral.I2C1,
|
ccdr.peripheral.I2C1,
|
||||||
&ccdr.clocks,
|
&ccdr.clocks,
|
||||||
);
|
);
|
||||||
|
|
|
@ -17,15 +17,21 @@ use rf_power::PowerMeasurementInterface;
|
||||||
|
|
||||||
use embedded_hal::{adc::OneShot, blocking::spi::Transfer};
|
use embedded_hal::{adc::OneShot, blocking::spi::Transfer};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
pub enum GpioPin {
|
||||||
const EXT_CLK_SEL_PIN: u8 = 8 + 7;
|
Led4Green = 0,
|
||||||
#[allow(dead_code)]
|
Led5Red = 1,
|
||||||
const OSC_EN_N_PIN: u8 = 8 + 6;
|
Led6Green = 2,
|
||||||
const ATT_RST_N_PIN: u8 = 8 + 5;
|
Led7Red = 3,
|
||||||
const ATT_LE3_PIN: u8 = 8 + 3;
|
Led8Green = 4,
|
||||||
const ATT_LE2_PIN: u8 = 8 + 2;
|
Led9Red = 5,
|
||||||
const ATT_LE1_PIN: u8 = 8 + 1;
|
AttLe0 = 8 + 0,
|
||||||
const ATT_LE0_PIN: u8 = 8;
|
AttLe1 = 8 + 1,
|
||||||
|
AttLe2 = 8 + 2,
|
||||||
|
AttLe3 = 8 + 3,
|
||||||
|
AttRstN = 8 + 5,
|
||||||
|
OscEnN = 8 + 6,
|
||||||
|
ExtClkSel = 8 + 7,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
|
|
Loading…
Reference in New Issue