add flash.c and all stubs for common functions

This commit is contained in:
Edward Emelianov
2023-02-13 21:55:18 +03:00
parent 2ecd2d188e
commit 617daf62c7
13 changed files with 816 additions and 7 deletions

View File

@@ -17,6 +17,7 @@
*/
#include "can.h"
#include "flash.h"
#include "hardware.h"
#include "proto.h"
#include "usb.h"
@@ -37,11 +38,12 @@ int main(void){
StartHSI();
SysTick_Config((uint32_t)48000); // 1ms
}
hw_setup();
flashstorage_init();
hw_setup(); // GPIO, ADC, timers, watchdog etc.
USBPU_OFF(); // make a reconnection
USB_setup();
USBPU_ON();
CAN_setup(100);
CAN_setup(the_conf.CANspeed);
uint32_t ctr = 0;
CAN_message *can_mesg;
while(1){