Skip to content
Snippets Groups Projects
Commit fb3e5b7c authored by lynxnb's avatar lynxnb Committed by Emilio Corigliano
Browse files

[AutomatedAntennas] Add ethernet hwmapping

parent d9c27d87
No related branches found
No related tags found
2 merge requests!39Draft: Compute unit v2,!35[AutomatedAntennas] Add ethernet hwmapping
Pipeline #8201 passed
...@@ -293,6 +293,12 @@ void IRQbspInit() ...@@ -293,6 +293,12 @@ void IRQbspInit()
stepper2::enable::mode(Mode::OUTPUT); stepper2::enable::mode(Mode::OUTPUT);
stepper2::direction::mode(Mode::OUTPUT); stepper2::direction::mode(Mode::OUTPUT);
ethernet::cs::mode(Mode::OUTPUT);
ethernet::cs::high();
ethernet::nrst::mode(Mode::OUTPUT);
ethernet::nrst::high();
ethernet::intr::mode(Mode::INPUT);
DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>(new STM32Serial( DefaultConsole::instance().IRQset(intrusive_ref_ptr<Device>(new STM32Serial(
defaultSerial, defaultSerialSpeed, STM32Serial::NOFLOWCTRL))); defaultSerial, defaultSerialSpeed, STM32Serial::NOFLOWCTRL)));
} }
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
#include "interfaces/gpio.h" #include "interfaces/gpio.h"
#define MIOSIX_ETHERNET_IRQ EXTI1_IRQHandlerImpl
#define MIOSIX_ETHERNET_SPI SPI4
namespace miosix namespace miosix
{ {
namespace interfaces namespace interfaces
...@@ -116,4 +119,16 @@ using pulseTimer = interfaces::timers::tim4ch1; ...@@ -116,4 +119,16 @@ using pulseTimer = interfaces::timers::tim4ch1;
using countTimer = interfaces::timers::tim8ch4; using countTimer = interfaces::timers::tim8ch4;
} // namespace stepper2 } // namespace stepper2
namespace ethernet
{
namespace spi
{
using namespace miosix::interfaces::spi4;
} // namespace spi
using cs = Gpio<GPIOE_BASE, 4>;
using intr = Gpio<GPIOC_BASE, 1>;
using nrst = Gpio<GPIOB_BASE, 1>;
} // namespace ethernet
} // namespace miosix } // namespace miosix
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment