Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed QEI DmTftLibrary
main.cpp
- Committer:
- lex9296
- Date:
- 2022-01-20
- Revision:
- 21:ab8027016a2c
- Parent:
- 19:45d0ce0f0677
- Child:
- 22:12c555cade79
File content as of revision 21:ab8027016a2c:
#include "mbed.h"
#include "Timers.h"
#include "Menu.h"
#include "Eeprom.h"
#include "main.h"
#include "app_config.h"
/*!
* \brief Define IO for Unused Pin
*/
DigitalOut F_CS( D6 ); // MBED description of pin
DigitalOut SD_CS( D8 ); // MBED description of pin
DigitalIn userButton( USER_BUTTON );
//DigitalOut doD13 (D13); // MBED description of pin
void PrintCompileSupportMessage( void );
/*!
* \brief Specify serial datarate for UART debug output
*/
void baud( int baudrate )
{
Serial s( USBTX, USBRX );
s.baud( baudrate );
}
int main (void){
baud (115200); // LA: Usa "printf" sulla seriale di bordo
F_CS = 1; // LA: HW Initialization InProgress
SD_CS = 1; // LA: HW Initialization InProgress
EepromInit( ); // LA: Inizializza la EEProm
// LA: FactoryReset se "userButton" premuto all'avvio
//
if( userButton == 0 )
{
FactoryReset( );
}
MenuInit( ); // LA: Inizializza il Display
while (1) {
StabilusMenu ();
}
}
void FactoryReset( void )
{
EepromFactoryReset( );
HAL_NVIC_SystemReset( );
}