Just4Trionic - CAN and BDM FLASH programmer for Saab cars

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers bdmtrionic.h Source File

bdmtrionic.h

00001 /*******************************************************************************
00002 
00003 bdmtrionic.cpp
00004 (c) 2010 by Sophie Dexter
00005 
00006 A derivative work based on:
00007 //-----------------------------------------------------------------------------
00008 //    CAN/BDM adapter firmware
00009 //    (C) Janis Silins, 2010
00010 //    $id$
00011 //-----------------------------------------------------------------------------
00012 
00013 ********************************************************************************
00014 
00015 WARNING: Use at your own risk, sadly this software comes with no guarantees.
00016 This software is provided 'free' and in good faith, but the author does not
00017 accept liability for any damage arising from its use.
00018 
00019 *******************************************************************************/
00020 
00021 #ifndef __BDMTRIONIC_H__
00022 #define __BDMTRIONIC_H__
00023 
00024 #include "mbed.h"
00025 
00026 #include "common.h"
00027 #include "bdmcpu32.h"
00028 #include "bdmdriver.h"
00029 
00030 // global variables
00031 static bool verify_flash = 1;
00032 
00033 // public functions
00034 uint8_t dump_flash(const uint32_t* start_addr, const uint32_t* end_addr);
00035 uint8_t erase_flash(const char* flash_type, const uint32_t* start_addr,
00036     const uint32_t* end_addr);
00037 uint8_t write_flash(const char* flash_type, const uint32_t* start_addr);
00038 
00039 uint8_t prep_t5_do(void);
00040 uint8_t prep_t8_do(void);
00041 uint8_t dump_trionic(void);
00042 uint8_t flash_trionic(void);
00043 
00044 #endif
00045 //-----------------------------------------------------------------------------
00046 //    EOF
00047 //-----------------------------------------------------------------------------