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: CRC16 FreescaleIAP FreescaleWatchdog GGSProtocol LM75B PIMA Parameters PersistentCircularQueue SerialNumberV2COM mbed-dev-watchdog_2016_03_04
Fork of smartRamalKW by
gravarNumeroSerie.cpp
00001 #include "appCommands.h" 00002 #include "serialNumber.h" 00003 00004 #define BOUNDARY_ERROR -99 //Commands may not span several sectors 00005 #define ALIGN_ERROR -98 //Data must be aligned on longword (two LSBs zero) 00006 #define PROTECTION_ERROR -97 //Flash sector is protected 00007 #define ACCESS_ERROR -96 //Something went wrong 00008 #define COLLISION_ERROR -95 //During writing something tried to flash which was written to 00009 #define LENGTH_ERROR -94 //The length must be multiples of 4 00010 #define RUNTIME_ERROR -93 00011 #define ERASE_ERROR -92 //The flash was not erased before writing to it 00012 #define PAYLOAD_INVALIDO -1 //Payload nao possui 25 bytes 00013 #define SUCESSO 0 00014 00015 void cmdGravarNumeroSerie(char * dados, unsigned char tamanhoDados){ 00016 00017 if(tamanhoDados != SERIAL_LENGTH){ 00018 exec.enviaResposta(RESP_GRAVAR_NUM_SERIE, (char)PAYLOAD_INVALIDO); 00019 return; 00020 } 00021 00022 int resp = sn.set(dados); 00023 exec.enviaResposta(RESP_GRAVAR_NUM_SERIE, resp); 00024 }
Generated on Thu Jul 14 2022 00:24:57 by
1.7.2
