#include <string.h>
#include <stdio.h>
#include <../include/hcs12/asm-m68hc12/portsaccess.h>
#include <../include/hcs12/asm-m68hc12/ports_def.h>
#include <../include/hcs12/asm-m68hc12/ports.h>
#include <../include/hcs12/interrupt.h>
#include "can.h"
Include dependency graph for applicfg.h:
Go to the source code of this file.
Defines | |
#define | CANOPEN_BIG_ENDIAN 1 |
Define the architecture : little_endian or big_endian. | |
#define | BUS_CLOCK 8 |
#define | SERIAL_SCI0_BAUD_RATE 38400 |
Configuration of the serials port SCI0 and SCI1. | |
#define | SERIAL_SCI1_BAUD_RATE 9600 |
#define | INTEGER8 signed char |
#define | INTEGER16 short |
#define | INTEGER24 |
#define | INTEGER32 long |
#define | INTEGER40 |
#define | INTEGER48 |
#define | INTEGER56 |
#define | INTEGER64 |
#define | UNS8 unsigned char |
#define | UNS16 unsigned short |
#define | UNS32 unsigned long |
#define | UNS24 |
#define | UNS40 |
#define | UNS48 |
#define | UNS56 |
#define | UNS64 |
#define | TIMEVAL UNS32 |
#define | TIMEVAL_MAX 0xFFFF |
#define | MS_TO_TIMEVAL(ms) (ms * 250) |
#define | US_TO_TIMEVAL(us) (us>>2) |
#define | REAL32 float |
#define | REAL64 double |
#define | MSG_ERR(num, str, val) |
Definition of MSG_ERR. | |
#define | MSG_WAR(num, str, val) |
Definition of MSG_WAR. | |
Functions | |
void | initSCI_0 (void) |
Initialisation of the serial port 0. | |
void | initSCI_1 (void) |
Initialisation of the serial port 1. | |
char * | hex_convert (char *buf, unsigned long value, char lastCar) |
void | printSCI_str (char sci, const char *str) |
void | printSCI_nbr (char sci, unsigned long nbr, char lastCar) |
void | initPLL (void) |
void | initHCS12 (void) |
Put here all the code to init the HCS12. |
#define BUS_CLOCK 8 |
#define CANOPEN_BIG_ENDIAN 1 |
Define the architecture : little_endian or big_endian.
Definition at line 55 of file applicfg.h.
Referenced by _writeNetworkDict(), and getReadResultNetworkDict().
#define INTEGER16 short |
Definition at line 130 of file applicfg.h.
#define INTEGER24 |
Definition at line 131 of file applicfg.h.
#define INTEGER32 long |
Definition at line 132 of file applicfg.h.
#define INTEGER40 |
Definition at line 133 of file applicfg.h.
#define INTEGER48 |
Definition at line 134 of file applicfg.h.
#define INTEGER56 |
Definition at line 135 of file applicfg.h.
#define INTEGER64 |
Definition at line 136 of file applicfg.h.
#define INTEGER8 signed char |
#define MS_TO_TIMEVAL | ( | ms | ) | (ms * 250) |
Definition at line 156 of file applicfg.h.
Referenced by _sendPDOevent(), heartbeatInit(), and proceedNODE_GUARD().
#define MSG_ERR | ( | num, | |||
str, | |||||
val | ) |
Definition of MSG_ERR.
Definition at line 177 of file applicfg.h.
Referenced by _readNetworkDict(), _sendPDOevent(), _writeNetworkDict(), buildPDO(), gene_SYNC_heartbeatError(), getReadResultNetworkDict(), getWriteResultNetworkDict(), lineToSDO(), proceedPDO(), proceedSDO(), SDOTimeoutAlarm(), SDOtoLine(), sendPDOrequest(), sendSDO(), and setSDOlineRestBytes().
#define MSG_WAR | ( | num, | |||
str, | |||||
val | ) |
Definition of MSG_WAR.
Definition at line 190 of file applicfg.h.
Referenced by _getODentry(), _readNetworkDict(), _sendPDOevent(), _setODentry(), _writeNetworkDict(), accessDictionaryError(), buildPDO(), canAddIdToFilter(), canInit1Filter(), canInitClock(), canInitFilter(), canMsgTransmit(), canSleepModeQ(), canSleepWupMode(), closeSDOtransfer(), DelAlarm(), failedSDO(), gene_SYNC_initialisation(), gene_SYNC_operational(), gene_SYNC_preOperational(), gene_SYNC_stopped(), initHCS12(), initSDOline(), initSensor(), main(), masterSendNMTnodeguard(), masterSendNMTstateChange(), objdictToSDOline(), proceedNMTstateChange(), proceedNODE_GUARD(), proceedPDO(), proceedSDO(), proceedSYNC(), ProducerHearbeatAlarm(), resetSDOline(), SDOlineToObjdict(), SDOTimeoutAlarm(), sendPDOrequest(), sendSDO(), sendSDOabort(), sendSYNC(), and slaveSendBootUp().
#define REAL32 float |
Definition at line 161 of file applicfg.h.
#define REAL64 double |
Definition at line 162 of file applicfg.h.
#define SERIAL_SCI0_BAUD_RATE 38400 |
Configuration of the serials port SCI0 and SCI1.
Definition at line 82 of file applicfg.h.
Referenced by initSCI_0().
#define SERIAL_SCI1_BAUD_RATE 9600 |
#define TIMEVAL UNS32 |
Definition at line 150 of file applicfg.h.
Referenced by class_timers::get_timer(), heartbeatInit(), proceedNODE_GUARD(), StartTimerLoop(), TimeDispatch(), and class_timers::timer_loop_thread_proc().
#define TIMEVAL_MAX 0xFFFF |
Definition at line 153 of file applicfg.h.
Referenced by class_timers::set_timer(), setTimer(), class_timers::start_timer_thread(), TimeDispatch(), and class_timers::timer_loop_thread_proc().
#define UNS16 unsigned short |
Definition at line 140 of file applicfg.h.
Referenced by _readNetworkDict(), _sendPDOevent(), _writeNetworkDict(), buildPDO(), decompo_dcf(), gene_SYNC_operational(), heartbeatInit(), PDOInit(), PDOStop(), proceedPDO(), proceedSDO(), sendPDOrequest(), sendSDO(), setNodeId(), and setState().
#define UNS24 |
Definition at line 142 of file applicfg.h.
#define UNS32 unsigned long |
Definition at line 141 of file applicfg.h.
Referenced by _getODentry(), _readNetworkDict(), _sendPDOevent(), _setODentry(), _writeNetworkDict(), buildPDO(), ConsumerHearbeatAlarm(), decompo_dcf(), heartbeatInit(), main(), objdictToSDOline(), PDOInit(), proceedNODE_GUARD(), proceedPDO(), proceedSDO(), ReadSDO(), RegisterSetODentryCallBack(), SDOlineToObjdict(), sendPDOrequest(), sendSDO(), setNodeId(), setState(), TestMaster_initialisation(), and TestMaster_post_TPDO().
#define UNS40 |
Definition at line 143 of file applicfg.h.
#define UNS48 |
Definition at line 144 of file applicfg.h.
#define UNS56 |
Definition at line 145 of file applicfg.h.
#define UNS64 |
#define UNS8 unsigned char |
Definition at line 139 of file applicfg.h.
Referenced by _getODentry(), _readNetworkDict(), _sendPDOevent(), _setODentry(), _writeNetworkDict(), buildPDO(), canAddIdToFilter(), canInit1Filter(), canMsgTransmit(), canReceive_driver(), canSend(), canSend_driver(), closeSDOtransfer(), ConsumerHearbeatAlarm(), CopyBits(), decompo_dcf(), f_can_receive(), failedSDO(), gene_SYNC_operational(), can_uvccm_win32::get_can_data(), getReadResultNetworkDict(), getSDOfreeLine(), getSDOlineOnUse(), getSDOlineRestBytes(), getWriteResultNetworkDict(), heartbeatInit(), heartbeatStop(), initSensor(), lineToSDO(), main(), masterRequestNodeState(), objdictToSDOline(), PDOStop(), proceedNODE_GUARD(), proceedPDO(), proceedSDO(), proceedSYNC(), ProducerHearbeatAlarm(), ReadSDO(), resetSDO(), resetSDOline(), SDOlineToObjdict(), SDOTimeoutAlarm(), SDOtoLine(), sendSDO(), sendSDOabort(), sendSYNC(), setNodeId(), TestMaster_initialisation(), TestMaster_post_TPDO(), and TPDO_Communication_Parameter_Callback().
#define US_TO_TIMEVAL | ( | us | ) | (us>>2) |
char* hex_convert | ( | char * | buf, | |
unsigned long | value, | |||
char | lastCar | |||
) |
Convert an integer to a string in hexadecimal format If you do not wants to use a lastCar, put lastCar = '' (end of string) ex : value = 0XABCDEF and lastCar = '
' buf[0] = '0' buf[1] = 'X' buf[2] = 'A' .... buf[7] = 'F' buf[8] = '
' buf[9] = ''
Definition at line 135 of file canOpenDriver.c.
Referenced by printSCI_nbr().
void initHCS12 | ( | void | ) |
Put here all the code to init the HCS12.
Definition at line 199 of file canOpenDriver.c.
References initPLL(), and MSG_WAR.
Referenced by initSensor().
Here is the call graph for this function:
void initPLL | ( | void | ) |
to start using the PLL. Bus clock becomes 24 MHz if the quartz on the board is at 16 MHz
Definition at line 188 of file canOpenDriver.c.
References CLKSEL, CRGFLG, IO_PORTS_8, PLLCTL, REFDV, and SYNR.
Referenced by initHCS12().
void initSCI_0 | ( | void | ) |
Initialisation of the serial port 0.
Definition at line 115 of file canOpenDriver.c.
References BUS_CLOCK, IO_PORTS_16, IO_PORTS_8, SCI0, SCIBDH, SCICR1, SCICR2, and SERIAL_SCI0_BAUD_RATE.
void initSCI_1 | ( | void | ) |
Initialisation of the serial port 1.
Definition at line 124 of file canOpenDriver.c.
References BUS_CLOCK, IO_PORTS_16, IO_PORTS_8, SCI1, SCIBDH, SCICR1, SCICR2, and SERIAL_SCI1_BAUD_RATE.
void printSCI_nbr | ( | char | sci, | |
unsigned long | nbr, | |||
char | lastCar | |||
) |
Print the number in hexadecimal to the serial port sci (sci takes the values SCI0 or SCI1)
Definition at line 179 of file canOpenDriver.c.
References hex_convert(), and printSCI_str().
Here is the call graph for this function:
void printSCI_str | ( | char | sci, | |
const char * | str | |||
) |
Print the string to the serial port sci (sci takes the values SCI0 or SCI1)
Definition at line 162 of file canOpenDriver.c.
References IO_PORTS_8, SCIDRL, and SCISR1.
Referenced by printSCI_nbr().