Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • avn/swd/skyward-boardcore
  • emilio.corigliano/skyward-boardcore
  • nicolo.caruso/skyward-boardcore
  • ettore.pane/skyward-boardcore
  • giulia.facchi/skyward-boardcore
  • valerio.flamminii/skyward-boardcore
6 results
Show changes
Showing
with 184 additions and 189 deletions
......@@ -232,73 +232,73 @@ void IRQbspInit()
userSwitch::mode(Mode::INPUT);
using namespace interfaces;
spi1::sck::mode(Mode::ALTERNATE);
spi1::sck::alternateFunction(5);
spi1::miso::mode(Mode::ALTERNATE);
spi1::sck::mode(Mode::ALTERNATE);
spi1::miso::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi1::miso::mode(Mode::ALTERNATE);
spi1::mosi::alternateFunction(5);
spi1::mosi::mode(Mode::ALTERNATE);
spi3::sck::mode(Mode::ALTERNATE);
spi3::sck::alternateFunction(6);
spi3::miso::mode(Mode::ALTERNATE);
spi3::sck::mode(Mode::ALTERNATE);
spi3::miso::alternateFunction(6);
spi3::mosi::mode(Mode::ALTERNATE);
spi3::miso::mode(Mode::ALTERNATE);
spi3::mosi::alternateFunction(5);
spi3::mosi::mode(Mode::ALTERNATE);
spi4::sck::mode(Mode::ALTERNATE);
spi4::sck::alternateFunction(5);
spi4::miso::mode(Mode::ALTERNATE);
spi4::sck::mode(Mode::ALTERNATE);
spi4::miso::alternateFunction(5);
spi4::mosi::mode(Mode::ALTERNATE);
spi4::miso::mode(Mode::ALTERNATE);
spi4::mosi::alternateFunction(5);
spi4::mosi::mode(Mode::ALTERNATE);
spi6::sck::mode(Mode::ALTERNATE);
spi6::sck::alternateFunction(5);
spi6::miso::mode(Mode::ALTERNATE);
spi6::sck::mode(Mode::ALTERNATE);
spi6::miso::alternateFunction(5);
spi6::mosi::mode(Mode::ALTERNATE);
spi6::miso::mode(Mode::ALTERNATE);
spi6::mosi::alternateFunction(5);
spi6::mosi::mode(Mode::ALTERNATE);
i2c1::sda::mode(Mode::ALTERNATE);
i2c1::sda::alternateFunction(4);
i2c1::scl::mode(Mode::ALTERNATE);
i2c1::sda::mode(Mode::ALTERNATE);
i2c1::scl::alternateFunction(4);
i2c1::scl::mode(Mode::ALTERNATE);
can1::rx::mode(Mode::ALTERNATE);
can1::rx::alternateFunction(9);
can1::tx::mode(Mode::ALTERNATE);
can1::rx::mode(Mode::ALTERNATE);
can1::tx::alternateFunction(9);
can1::tx::mode(Mode::ALTERNATE);
can2::rx::mode(Mode::ALTERNATE);
can2::rx::alternateFunction(9);
can2::tx::mode(Mode::ALTERNATE);
can2::rx::mode(Mode::ALTERNATE);
can2::tx::alternateFunction(9);
can2::tx::mode(Mode::ALTERNATE);
usart1::tx::mode(Mode::ALTERNATE);
usart1::tx::alternateFunction(7);
usart1::rx::mode(Mode::ALTERNATE);
usart1::tx::mode(Mode::ALTERNATE);
usart1::rx::alternateFunction(7);
usart1::rx::mode(Mode::ALTERNATE);
usart2::tx::mode(Mode::ALTERNATE);
usart2::tx::alternateFunction(7);
usart2::rx::mode(Mode::ALTERNATE);
usart2::tx::mode(Mode::ALTERNATE);
usart2::rx::alternateFunction(7);
usart2::rx::mode(Mode::ALTERNATE);
uart4::tx::mode(Mode::ALTERNATE);
uart4::tx::alternateFunction(8);
uart4::rx::mode(Mode::ALTERNATE);
uart4::tx::mode(Mode::ALTERNATE);
uart4::rx::alternateFunction(8);
uart4::rx::mode(Mode::ALTERNATE);
using namespace timers;
tim3ch1::mode(Mode::ALTERNATE);
tim3ch1::alternateFunction(2);
tim3ch2::mode(Mode::ALTERNATE);
tim3ch1::mode(Mode::ALTERNATE);
tim3ch2::alternateFunction(2);
tim1ch1::mode(Mode::ALTERNATE);
tim3ch2::mode(Mode::ALTERNATE);
tim1ch1::alternateFunction(1);
tim12ch2::mode(Mode::ALTERNATE);
tim1ch1::mode(Mode::ALTERNATE);
tim12ch2::alternateFunction(9);
tim12ch2::mode(Mode::ALTERNATE);
using namespace sensors;
LSM6DSRX::cs::mode(Mode::OUTPUT);
......
......@@ -218,4 +218,4 @@ using exp_sense = Gpio<GPIOG_BASE, 6>;
} // namespace gpios
} // namespace miosix
\ No newline at end of file
} // namespace miosix
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -49,8 +49,7 @@ void program_startup()
// enabled
__disable_irq();
miosix::IRQconfigureCache((const unsigned int *)0xd0000000,
8 * 1024 * 1024);
miosix::IRQconfigureCache((const unsigned int*)0xd0000000, 8 * 1024 * 1024);
// These are defined in the linker script
extern unsigned char _etext asm("_etext");
......@@ -60,11 +59,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -231,26 +231,26 @@ void IRQbspInit()
userLed4::mode(Mode::OUTPUT);
userSwitch::mode(Mode::INPUT);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::miso::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::mosi::alternateFunction(5);
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi1::sck::alternateFunction(5);
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi3::miso::mode(Mode::ALTERNATE);
interfaces::spi3::miso::alternateFunction(6);
interfaces::spi3::mosi::mode(Mode::ALTERNATE);
interfaces::spi3::miso::mode(Mode::ALTERNATE);
interfaces::spi3::mosi::alternateFunction(5);
interfaces::spi3::sck::mode(Mode::ALTERNATE);
interfaces::spi3::mosi::mode(Mode::ALTERNATE);
interfaces::spi3::sck::alternateFunction(6);
interfaces::spi3::sck::mode(Mode::ALTERNATE);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::miso::alternateFunction(5);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::mosi::alternateFunction(5);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::sck::alternateFunction(5);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
radio1::cs::mode(Mode::OUTPUT);
radio1::cs::high();
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -49,8 +49,7 @@ void program_startup()
// enabled
__disable_irq();
miosix::IRQconfigureCache((const unsigned int *)0xd0000000,
8 * 1024 * 1024);
miosix::IRQconfigureCache((const unsigned int*)0xd0000000, 8 * 1024 * 1024);
// These are defined in the linker script
extern unsigned char _etext asm("_etext");
......@@ -60,11 +59,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -224,38 +224,38 @@ void IRQbspInit()
// Enable USART1 pins port
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::sck::alternateFunction(5);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::miso::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::mosi::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi3::sck::mode(Mode::ALTERNATE);
interfaces::spi3::sck::alternateFunction(6);
interfaces::spi3::miso::mode(Mode::ALTERNATE);
interfaces::spi3::sck::mode(Mode::ALTERNATE);
interfaces::spi3::miso::alternateFunction(6);
interfaces::spi3::mosi::mode(Mode::ALTERNATE);
interfaces::spi3::miso::mode(Mode::ALTERNATE);
interfaces::spi3::mosi::alternateFunction(5);
interfaces::spi3::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
interfaces::spi4::sck::alternateFunction(5);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
interfaces::spi4::miso::alternateFunction(5);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::mosi::alternateFunction(5);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
// USART1 configured by the miosix serial driver
interfaces::usart2::tx::mode(Mode::ALTERNATE);
interfaces::usart2::tx::alternateFunction(7);
interfaces::usart2::rx::mode(Mode::ALTERNATE);
interfaces::usart2::tx::mode(Mode::ALTERNATE);
interfaces::usart2::rx::alternateFunction(7);
interfaces::usart2::rx::mode(Mode::ALTERNATE);
interfaces::can2::tx::mode(Mode::ALTERNATE);
interfaces::can2::tx::alternateFunction(9);
interfaces::can2::rx::mode(Mode::ALTERNATE);
interfaces::can2::tx::mode(Mode::ALTERNATE);
interfaces::can2::rx::alternateFunction(9);
interfaces::can2::rx::mode(Mode::ALTERNATE);
peripherals::leds::userLed1::mode(Mode::OUTPUT);
peripherals::leds::userLed2::mode(Mode::OUTPUT);
......@@ -287,10 +287,10 @@ void IRQbspInit()
peripherals::max31856::cs::mode(Mode::OUTPUT);
peripherals::max31856::cs::high();
peripherals::servos::servo1::mode(Mode::ALTERNATE);
peripherals::servos::servo1::alternateFunction(3);
peripherals::servos::servo2::mode(Mode::ALTERNATE);
peripherals::servos::servo1::mode(Mode::ALTERNATE);
peripherals::servos::servo2::alternateFunction(3);
peripherals::servos::servo2::mode(Mode::ALTERNATE);
peripherals::tank_level::lvl1::mode(Mode::INPUT);
peripherals::tank_level::lvl2::mode(Mode::INPUT);
......
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -49,8 +49,7 @@ void program_startup()
// enabled
__disable_irq();
miosix::IRQconfigureCache((const unsigned int *)0xd0000000,
8 * 1024 * 1024);
miosix::IRQconfigureCache((const unsigned int*)0xd0000000, 8 * 1024 * 1024);
// These are defined in the linker script
extern unsigned char _etext asm("_etext");
......@@ -60,11 +59,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -233,9 +233,9 @@ void configureBackupSram()
extern unsigned char _preserve_end asm("_preserve_end");
extern unsigned char _preserve_load asm("_preserve_load");
unsigned char *preserve_start = &_preserve_start;
unsigned char *preserve_end = &_preserve_end;
unsigned char *preserve_load = &_preserve_load;
unsigned char* preserve_start = &_preserve_start;
unsigned char* preserve_end = &_preserve_end;
unsigned char* preserve_load = &_preserve_load;
// Load the .preserve section from flash if not a software reset
if (miosix::lastResetReason() != miosix::ResetReason::SOFTWARE)
......@@ -255,59 +255,59 @@ void IRQbspInit()
userLed3::mode(Mode::OUTPUT);
userLed4::mode(Mode::OUTPUT);
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::sck::alternateFunction(5);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::miso::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::mosi::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi3::sck::mode(Mode::ALTERNATE);
interfaces::spi3::sck::alternateFunction(6);
interfaces::spi3::miso::mode(Mode::ALTERNATE);
interfaces::spi3::sck::mode(Mode::ALTERNATE);
interfaces::spi3::miso::alternateFunction(6);
interfaces::spi3::mosi::mode(Mode::ALTERNATE);
interfaces::spi3::miso::mode(Mode::ALTERNATE);
interfaces::spi3::mosi::alternateFunction(5);
interfaces::spi3::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
interfaces::spi4::sck::alternateFunction(5);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
interfaces::spi4::miso::alternateFunction(5);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::mosi::alternateFunction(5);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
interfaces::spi6::sck::mode(Mode::ALTERNATE);
interfaces::spi6::sck::alternateFunction(5);
interfaces::spi6::miso::mode(Mode::ALTERNATE);
interfaces::spi6::sck::mode(Mode::ALTERNATE);
interfaces::spi6::miso::alternateFunction(5);
interfaces::spi6::mosi::mode(Mode::ALTERNATE);
interfaces::spi6::miso::mode(Mode::ALTERNATE);
interfaces::spi6::mosi::alternateFunction(5);
interfaces::spi6::mosi::mode(Mode::ALTERNATE);
// We do not need to setup the miosix usart
interfaces::uart4::tx::mode(Mode::ALTERNATE);
interfaces::uart4::tx::alternateFunction(8);
interfaces::uart4::rx::mode(Mode::ALTERNATE);
interfaces::uart4::tx::mode(Mode::ALTERNATE);
interfaces::uart4::rx::alternateFunction(8);
interfaces::uart4::rx::mode(Mode::ALTERNATE);
interfaces::i2c1::sda::mode(Mode::ALTERNATE);
interfaces::i2c1::sda::alternateFunction(4);
interfaces::i2c1::scl::mode(Mode::ALTERNATE);
interfaces::i2c1::sda::mode(Mode::ALTERNATE);
interfaces::i2c1::scl::alternateFunction(4);
interfaces::i2c1::scl::mode(Mode::ALTERNATE);
interfaces::can1::tx::mode(Mode::ALTERNATE);
interfaces::can1::tx::alternateFunction(9);
interfaces::can1::rx::mode(Mode::ALTERNATE);
interfaces::can1::tx::mode(Mode::ALTERNATE);
interfaces::can1::rx::alternateFunction(9);
interfaces::can1::rx::mode(Mode::ALTERNATE);
interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim1ch1::alternateFunction(1);
interfaces::timers::tim3ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim3ch1::alternateFunction(2);
interfaces::timers::tim4ch2::mode(Mode::ALTERNATE);
interfaces::timers::tim3ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim4ch2::alternateFunction(2);
interfaces::timers::tim9ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim4ch2::mode(Mode::ALTERNATE);
interfaces::timers::tim9ch1::alternateFunction(3);
interfaces::timers::tim9ch1::mode(Mode::ALTERNATE);
interfaces::adcs::adc12in8::mode(Mode::INPUT_ANALOG);
interfaces::adcs::adc12in9::mode(Mode::INPUT_ANALOG);
......
......@@ -231,4 +231,4 @@ using statusLed = Gpio<GPIOB_BASE, 13>;
using camEnable = Gpio<GPIOB_BASE, 14>;
} // namespace gpios
} // namespace miosix
\ No newline at end of file
} // namespace miosix
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -49,8 +49,7 @@ void program_startup()
// enabled
__disable_irq();
miosix::IRQconfigureCache((const unsigned int *)0xd0000000,
8 * 1024 * 1024);
miosix::IRQconfigureCache((const unsigned int*)0xd0000000, 8 * 1024 * 1024);
// These are defined in the linker script
extern unsigned char _etext asm("_etext");
......@@ -60,11 +59,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -243,53 +243,53 @@ void IRQbspInit()
// Setting AF, mode for interfaces
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::sck::alternateFunction(5);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::miso::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::mosi::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi2::sck::mode(Mode::ALTERNATE);
interfaces::spi2::sck::alternateFunction(5);
interfaces::spi2::miso::mode(Mode::ALTERNATE);
interfaces::spi2::sck::mode(Mode::ALTERNATE);
interfaces::spi2::miso::alternateFunction(5);
interfaces::spi2::mosi::mode(Mode::ALTERNATE);
interfaces::spi2::miso::mode(Mode::ALTERNATE);
interfaces::spi2::mosi::alternateFunction(5);
interfaces::spi2::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
interfaces::spi4::sck::alternateFunction(5);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
interfaces::spi4::miso::alternateFunction(5);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::mosi::alternateFunction(5);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
// We do not need to setup the miosix usart
interfaces::usart2::tx::mode(Mode::ALTERNATE_PULL_UP);
interfaces::usart2::tx::alternateFunction(7);
interfaces::usart2::rx::mode(Mode::ALTERNATE_OD_PULL_UP);
interfaces::usart2::tx::mode(Mode::ALTERNATE_PULL_UP);
interfaces::usart2::rx::alternateFunction(7);
interfaces::usart2::rx::mode(Mode::ALTERNATE_OD_PULL_UP);
interfaces::uart4::tx::mode(Mode::ALTERNATE);
interfaces::uart4::tx::alternateFunction(8);
interfaces::uart4::rx::mode(Mode::ALTERNATE);
interfaces::uart4::tx::mode(Mode::ALTERNATE);
interfaces::uart4::rx::alternateFunction(8);
interfaces::uart4::rx::mode(Mode::ALTERNATE);
interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim1ch1::alternateFunction(1);
// interfaces::timers::tim2ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
// interfaces::timers::tim2ch1::alternateFunction(1);
// interfaces::timers::tim2ch4::mode(Mode::ALTERNATE);
// interfaces::timers::tim2ch1::mode(Mode::ALTERNATE);
// interfaces::timers::tim2ch4::alternateFunction(1);
interfaces::timers::tim3ch2::mode(Mode::ALTERNATE);
// interfaces::timers::tim2ch4::mode(Mode::ALTERNATE);
interfaces::timers::tim3ch2::alternateFunction(2);
interfaces::timers::tim4ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim3ch2::mode(Mode::ALTERNATE);
interfaces::timers::tim4ch1::alternateFunction(2);
interfaces::timers::tim8ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim4ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim8ch1::alternateFunction(3);
// interfaces::timers::tim10ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim8ch1::mode(Mode::ALTERNATE);
// interfaces::timers::tim10ch1::alternateFunction(3);
// interfaces::timers::tim10ch1::mode(Mode::ALTERNATE);
commBox::ledTimY1::mode(Mode::OUTPUT);
commBox::ledTimY1::low();
......
......@@ -96,4 +96,4 @@ void configureSdram();
*/
inline bool sdCardSense() { return true; }
} // namespace miosix
\ No newline at end of file
} // namespace miosix
......@@ -27,8 +27,8 @@
// The PARSING_FROM_IDE is because Netbeans gets confused by this, it is never
// defined when compiling the code.
#ifndef PARSING_FROM_IDE
//#error This error is a reminder that you have not edited miosix_settings.h
// yet.
// #error This error is a reminder that you have not edited miosix_settings.h
// yet.
#endif // PARSING_FROM_IDE
/**
......@@ -70,14 +70,14 @@ namespace miosix
// Uncomment only *one* of those
#define SCHED_TYPE_PRIORITY
//#define SCHED_TYPE_CONTROL_BASED
//#define SCHED_TYPE_EDF
// #define SCHED_TYPE_CONTROL_BASED
// #define SCHED_TYPE_EDF
/// \def WITH_CPU_TIME_COUNTER
/// Allows to enable/disable CPUTimeCounter to save code size and remove its
/// overhead from the scheduling process. By default it is not defined
/// (CPUTimeCounter is disabled).
//#define WITH_CPU_TIME_COUNTER
// #define WITH_CPU_TIME_COUNTER
//
// Filesystem options
......@@ -110,7 +110,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// This enables the dynamic loader to load elf programs, the extended system
/// call service and, if the hardware supports it, the MPU to provide memory
/// isolation of processes
//#define WITH_PROCESSES
// #define WITH_PROCESSES
#if defined(WITH_PROCESSES) && defined(__NO_EXCEPTIONS)
#error Processes require C++ exception support
......@@ -145,7 +145,7 @@ const unsigned char MAX_OPEN_FILES = 8;
/// \def WITH_DEEP_SLEEP
/// Adds interfaces and required variables to support deep sleep state switch
/// automatically when peripherals are not required
//#define WITH_DEEP_SLEEP
// #define WITH_DEEP_SLEEP
/**
* \def JTAG_DISABLE_SLEEP
......
......@@ -49,8 +49,7 @@ void program_startup()
// enabled
__disable_irq();
miosix::IRQconfigureCache((const unsigned int *)0xd0000000,
8 * 1024 * 1024);
miosix::IRQconfigureCache((const unsigned int*)0xd0000000, 8 * 1024 * 1024);
// These are defined in the linker script
extern unsigned char _etext asm("_etext");
......@@ -60,11 +59,11 @@ void program_startup()
extern unsigned char _bss_end asm("_bss_end");
// Initialize .data section, clear .bss section
unsigned char *etext = &_etext;
unsigned char *data = &_data;
unsigned char *edata = &_edata;
unsigned char *bss_start = &_bss_start;
unsigned char *bss_end = &_bss_end;
unsigned char* etext = &_etext;
unsigned char* data = &_data;
unsigned char* edata = &_edata;
unsigned char* bss_start = &_bss_start;
unsigned char* bss_end = &_bss_end;
memcpy(data, etext, edata - data);
memset(bss_start, 0, bss_end - bss_start);
......
......@@ -233,9 +233,9 @@ void configureBackupSram()
extern unsigned char _preserve_end asm("_preserve_end");
extern unsigned char _preserve_load asm("_preserve_load");
unsigned char *preserve_start = &_preserve_start;
unsigned char *preserve_end = &_preserve_end;
unsigned char *preserve_load = &_preserve_load;
unsigned char* preserve_start = &_preserve_start;
unsigned char* preserve_end = &_preserve_end;
unsigned char* preserve_load = &_preserve_load;
// Load the .preserve section from flash if not a software reset
if (miosix::lastResetReason() != miosix::ResetReason::SOFTWARE)
......@@ -255,43 +255,43 @@ void IRQbspInit()
userLed3::mode(Mode::OUTPUT);
userLed4::mode(Mode::OUTPUT);
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::sck::alternateFunction(5);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::sck::mode(Mode::ALTERNATE);
interfaces::spi1::miso::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi1::miso::mode(Mode::ALTERNATE);
interfaces::spi1::mosi::alternateFunction(5);
interfaces::spi1::mosi::mode(Mode::ALTERNATE);
interfaces::spi3::sck::mode(Mode::ALTERNATE);
interfaces::spi3::sck::alternateFunction(6);
interfaces::spi3::miso::mode(Mode::ALTERNATE);
interfaces::spi3::sck::mode(Mode::ALTERNATE);
interfaces::spi3::miso::alternateFunction(6);
interfaces::spi3::mosi::mode(Mode::ALTERNATE);
interfaces::spi3::miso::mode(Mode::ALTERNATE);
interfaces::spi3::mosi::alternateFunction(5);
interfaces::spi3::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
interfaces::spi4::sck::alternateFunction(5);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::sck::mode(Mode::ALTERNATE);
interfaces::spi4::miso::alternateFunction(5);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
interfaces::spi4::miso::mode(Mode::ALTERNATE);
interfaces::spi4::mosi::alternateFunction(5);
interfaces::spi4::mosi::mode(Mode::ALTERNATE);
// We do not need to setup the miosix usart
interfaces::uart4::tx::mode(Mode::ALTERNATE);
interfaces::uart4::tx::alternateFunction(8);
interfaces::uart4::rx::mode(Mode::ALTERNATE);
interfaces::uart4::tx::mode(Mode::ALTERNATE);
interfaces::uart4::rx::alternateFunction(8);
interfaces::uart4::rx::mode(Mode::ALTERNATE);
interfaces::can1::tx::mode(Mode::ALTERNATE);
interfaces::can1::tx::alternateFunction(9);
interfaces::can1::rx::mode(Mode::ALTERNATE);
interfaces::can1::tx::mode(Mode::ALTERNATE);
interfaces::can1::rx::alternateFunction(9);
interfaces::can1::rx::mode(Mode::ALTERNATE);
interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim1ch1::alternateFunction(1);
interfaces::timers::tim3ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim1ch1::mode(Mode::ALTERNATE);
interfaces::timers::tim3ch1::alternateFunction(2);
interfaces::timers::tim3ch1::mode(Mode::ALTERNATE);
interfaces::adcs::adc12in9::mode(Mode::INPUT_ANALOG);
interfaces::adcs::adc12in14::mode(Mode::INPUT_ANALOG);
......
......@@ -140,4 +140,4 @@ namespace gpios
using boardLed = Gpio<GPIOC_BASE, 5>;
} // namespace gpios
} // namespace miosix
\ No newline at end of file
} // namespace miosix