38 nvic_set_priority(NVIC_TIM2_IRQ,0);
71 for(
volatile uint32_t j = 0; j < delay; j++) {
73 for(
volatile uint16_t i = 0; i < 548; i++);
80 for(
volatile uint32_t j = 0; j < delay; j++) {
82 for(
volatile uint16_t i = 0; i < 1732; i++);
88 for(
volatile uint32_t j = 0; j < delay; j++) {
90 for(
volatile uint16_t i = 0; i < 2995; i++);
96 for(
volatile uint32_t j = 0; j < delay; j++) {
98 for(
volatile uint16_t i = 0; i < 3375; i++);
104 for(
volatile uint32_t j = 0; j < delay; j++) {
106 for(
volatile uint16_t i = 0; i < 3890; i++);
External 8MHz oscillator, multiplied to 72MHz final.
Generic header file for all modules.
void USB_put(uint8_t byte)
Send a single byte on USB.
mcu_error TIMER_setupCount(timer_main timerNumber, uint32_t frequency, void(*handler)(void))
Initialize given timer for standard count with interrupt on timeout.
timer_main
Main timers available on the MCU.
uint32_t CLOCK_getSpeed(void)
Get the current clock speed of the device.
void USB_setup(void)
Initialize the USB device.
void delayms(uint32_t delay)
Millisecond blocking delay.
void USB_update(void)
Update the USB peripheral.
void USB_coms(timer_main timerNumber)
Set up USB "serial" communication. The passed timer is used to update the device. ...
mcu_error CLOCK_setSpeed(clock_option option)
Set the final clock speed of the device.
mcu_error SYSTICK_setup(uint32_t timeout, void(*handler)(void))
Sets up systick and handler.