Skip to content
Snippets Groups Projects
Commit bad73e7c authored by Federico Lolli's avatar Federico Lolli
Browse files

[entrypoint] updated entrypoint

parent 72020d60
Branches
Tags
No related merge requests found
...@@ -37,6 +37,7 @@ int main() ...@@ -37,6 +37,7 @@ int main()
TRACE("Setting up SPI...\n"); TRACE("Setting up SPI...\n");
SPIBus bus(SPI3); SPIBus bus(SPI3);
bus.set8BitFrameFormat();
SPIBusConfig busConfig = LIS2MDL::getDefaultSPIConfig(); SPIBusConfig busConfig = LIS2MDL::getDefaultSPIConfig();
...@@ -45,6 +46,9 @@ int main() ...@@ -45,6 +46,9 @@ int main()
config.deviceMode = LIS2MDL::MD_CONTINUOUS; config.deviceMode = LIS2MDL::MD_CONTINUOUS;
config.temperatureDivider = 5; config.temperatureDivider = 5;
TRACE("Setting up RCC...\n");
RCC->APB1ENR1 |= RCC_APB1ENR1_SPI3EN;
TRACE("Setting up Sensor...\n"); TRACE("Setting up Sensor...\n");
LIS2MDL sensor(bus, cs, busConfig, config); LIS2MDL sensor(bus, cs, busConfig, config);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment