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: SPI_TFTx2_ILI9341 TOUCH_TFTx2_ILI9341 TFT_fonts mbed
Fork of CANary by
utility.h
- Committer:
- TickTock
- Date:
- 2013-03-19
- Revision:
- 33:a277743ebdeb
- Parent:
- 32:c9d9b6cb5de1
- Child:
- 34:4751a8259b18
File content as of revision 33:a277743ebdeb:
// utility.h
//#include "mbed.h"
#include "CAN.h"
#include "common.h"
#include "TOUCH_TFTx2.h"
extern Timer timer;
extern volatile int secsNoMsg;
extern volatile int secsNoTouch;
extern volatile bool canIdle;
extern volatile bool userIdle;
extern char displayLog[20][40];
extern unsigned char displayLoc;
extern bool touched;
extern bool logOpen;
extern char writeBuffer[maxBufLen][13];
extern volatile int writePointer;
extern DigitalOut led1,led2,led3,led4;
extern char indexLastMsg[0x800];
extern unsigned char dMode[2];
extern unsigned char msgChanged[100];
extern unsigned char battData[256];
extern CANMessage lastMsg[100];
extern CAN can1,can2;
extern DigitalOut can1SleepMode,can2SleepMode;
extern bool pollCP;
extern bool daylight;
extern TOUCH_TFTx2 tt;
extern "C" {
void mbed_reset();
void RTC_IRQHandler();
void RTC_Init (void);
void logMsg (char *msg);
void touch_ISR();
unsigned short getTimeStamp();
void logCan (char mType, CANMessage canRXmsg);
void logTS ();
void sendCPreq();
void sendTreq();
void tickerISR();
void recieve1();
void recieve2();
unsigned char buttonX(unsigned short X, unsigned char columns);
unsigned char buttonY(unsigned short Y,unsigned char rows);
void saveConfig();
void readConfig();
void upDate(unsigned char field, bool updownbar);
}
//LEAF OBD
//1:
//2:
//3: AVCAN-L White/Blue
//4: VSS-Shield
//5: VSS Brown,White/Brown
//6: CARCAN-H Green
//7:
//8: 12V-SW Orange,White/Orange
//9:
//10:
//11: AVCAN-H Blue
//12: EVCAN-L White/Grey
//13: EVCAN-H Grey
//14: CARCAN-L White/Green
//15:
//16: 12V-AON Red/Blue,Blue/Red
//VP230
//1:D
//2:GND
//3:VCC
//4:R
//5:Vref
//6:CANL
//7:CANH
//8:RS
//LPC1768
//1: VSS
//2: NC:VIN (4.5-9V supply)
//3: NC:VB
//4: NC:nR
//5: SPI:Reset
//6: SPI:CS0
//7: SPI:CS1
//8: CAN1:Sleep --> 8:CAN1:RS
//9: CAN1:RX --> 4:CAN1:R
//10: CAN1:TX --> 1:CAN1:D
//11: SPI:MOSI
//12: SPI:MISO
//13: SPI:SCLK
//14: NC:Ain
//15: MON12V --> 4K to 12V, 1K to VSS (To be implemented)
//16: TOUCH_X+
//17: TOUCH_X-
//18: NC:Aout
//19: TOUCH_Y+
//20: TOUCH_Y-
//21: Spkr+
//22: NC:pwm
//23: LED
//24: NC:pwm
//25: NC:pwm
//26: NC:pwm
//27: NC
//28: CAN2:Sleep --> 8:CAN2:RS
//29: CAN2:TX --> 1:CAN2:D
//30: CAN2:RX --> 4:CAN2:R
//31: USB_D+
//32: USB_D-
//33: NC:Eth_TD+
//34: NC:Eth_TD-
//35: NC:Eth_RD+
//36: NC:Eth_RD-
//37: NC:IF+
//38: NC:IF-
//39: NC:5Vout (only available when connected as USB device)
//40: VCC3.3
