Skip to content
Snippets Groups Projects
Commit 9096c209 authored by Alvise de'Faveri's avatar Alvise de'Faveri
Browse files

[tortellino] Updated bsp after pinlist review with ELS

parent a34d3827
Branches
No related tags found
No related merge requests found
...@@ -100,7 +100,34 @@ void IRQbspInit() ...@@ -100,7 +100,34 @@ void IRQbspInit()
lsm9ds1::cs_ag::high(); lsm9ds1::cs_ag::high();
lsm9ds1::cs_mag::mode(Mode::OUTPUT); lsm9ds1::cs_mag::mode(Mode::OUTPUT);
lsm9ds1::cs_mag::high(); lsm9ds1::cs_mag::high();
lsm9ds1::int1_ag::mode(Mode::INPUT); lsm9ds1::int_ag::mode(Mode::INPUT);
lsm9ds1::ready_mag::mode(Mode::INPUT);
slitta::mode(Mode::INPUT);
finecorsa::mode(Mode::INPUT);
nosecone_dtch::mode(Mode::INPUT);
launchpad_dtch::mode(Mode::INPUT);
using namespace actuators;
hbridge::is::mode(Mode::INPUT);
hbridge::in::mode(Mode::OUTPUT);
hbridge::in::low();
hbridge::inh::mode(Mode::OUTPUT);
hbridge::in::low();
servo::in::mode(Mode::OUTPUT);
servo::in::low();
using namespace misc;
leds::green::mode(Mode::OUTPUT);
leds::green::low();
leds::orange::mode(Mode::OUTPUT);
leds::orange::low();
leds::red::mode(Mode::OUTPUT);
leds::red::low();
leds::blue::mode(Mode::OUTPUT);
leds::blue::low();
xbee::cs::mode(Mode::OUTPUT); xbee::cs::mode(Mode::OUTPUT);
xbee::cs::high(); xbee::cs::high();
...@@ -114,7 +141,7 @@ void IRQbspInit() ...@@ -114,7 +141,7 @@ void IRQbspInit()
delayMs(100); delayMs(100);
ledOff(); ledOff();
// Open default serial on USART1 // Open default serial on USART3 (PB10, PB11)
DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>( DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>(
new STM32Serial(3, 9600, new STM32Serial(3, 9600,
defaultSerialFlowctrl ? STM32Serial::RTSCTS : STM32Serial::NOFLOWCTRL))); defaultSerialFlowctrl ? STM32Serial::RTSCTS : STM32Serial::NOFLOWCTRL)));
......
...@@ -33,60 +33,73 @@ ...@@ -33,60 +33,73 @@
namespace miosix { namespace miosix {
namespace interfaces { namespace interfaces {
namespace spi1 { namespace spi1 {
using sck = Gpio<GPIOA_BASE, 5>; using sck = Gpio<GPIOA_BASE, 5>;
using miso = Gpio<GPIOA_BASE, 6>; using miso = Gpio<GPIOA_BASE, 6>;
using mosi = Gpio<GPIOA_BASE, 7>; using mosi = Gpio<GPIOA_BASE, 7>;
} //namespace spi1 }
namespace spi2 { namespace spi2 {
using sck = Gpio<GPIOB_BASE, 13>; using sck = Gpio<GPIOB_BASE, 13>;
using miso = Gpio<GPIOB_BASE, 14>; using miso = Gpio<GPIOB_BASE, 14>;
using mosi = Gpio<GPIOB_BASE, 15>; using mosi = Gpio<GPIOB_BASE, 15>;
} //namespace spi2 }
}
} //namespace interfaces
namespace sensors { namespace sensors {
// Digital Pressure
namespace ms5803 { namespace ms5803 {
using cs = Gpio<GPIOD_BASE, 7>; using cs = Gpio<GPIOD_BASE, 7>;
} //namespace ms5803 }
// IMU magneto
namespace lsm9ds1 { namespace lsm9ds1 {
using cs_ag = Gpio<GPIOE_BASE, 7>; using cs_ag = Gpio<GPIOE_BASE, 7>; // chip select acc
using cs_mag = Gpio<GPIOE_BASE, 9>; using cs_mag = Gpio<GPIOE_BASE, 9>; // chip select magn
using int1_ag = Gpio<GPIOC_BASE, 13>; using int_ag = Gpio<GPIOC_BASE, 13>; // interrupt accelerometro
using drdy_mag = Gpio<GPIOC_BASE, 15>; using ready_mag = Gpio<GPIOC_BASE, 15>; // data ready magnetometro
} }
} //namespace sensors // Dpl mecahnism sensors
using slitta = Gpio<GPIOC_BASE, 1>;
using finecorsa = Gpio<GPIOC_BASE, 3>;
namespace actuators { // Detach pins
using nosecone_dtch = Gpio<GPIOC_BASE, 1>;
using tcPwm = Gpio<GPIOC_BASE, 2>; //TODO: check using launchpad_dtch = Gpio<GPIOC_BASE, 3>;
}
namespace actuators {
// Backup expulsion system
namespace hbridge { namespace hbridge {
// TODO: check using is = Gpio<GPIOC_BASE, 0>; // current sensor
using in = Gpio<GPIOC_BASE, 2>; // input
using inh = Gpio<GPIOA_BASE, 0>; // inhibit
} }
} //namespace actuators // Servomotor for primary expulsion system
namespace servo {
using in = Gpio<GPIOC_BASE, 6>;
}
}
namespace misc { namespace misc {
//using button = Gpio<GPIOA_BASE, 0>;
using aux1 = Gpio<GPIOC_BASE, 1>;
using aux2 = Gpio<GPIOC_BASE, 3>;
using aux3 = Gpio<GPIOC_BASE, 5>; using aux3 = Gpio<GPIOC_BASE, 5>;
namespace leds {
using green = Gpio<GPIOD_BASE, 12>;
using orange = Gpio<GPIOD_BASE, 13>;
using red = Gpio<GPIOD_BASE, 14>;
using blue = Gpio<GPIOD_BASE, 15>;
}
} }
namespace xbee { namespace xbee {
using cs = Gpio<GPIOE_BASE, 4>; using cs = Gpio<GPIOE_BASE, 4>;
using attn = Gpio<GPIOE_BASE, 6>; using attn = Gpio<GPIOE_BASE, 6>;
using reset = Gpio<GPIOE_BASE, 5>; using reset = Gpio<GPIOE_BASE, 5>;
} //namespace xbee }
} //namespace miosix } //namespace miosix
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment