#ifndef CANAPI_GLOBAL__H
#define CANAPI_GLOBAL__H

/* Canapi.h*/

extern char canString[MAX_LENGTH_CAN_DATA];
extern  char decrypt_uartString[BUFFER_SIZE];
extern char ring_buffer[MAX_INPUT][MAX_LENGTH_CAN_DATA];/*varianle for strorage all received CAN data*/
extern char setParameter[MAX_PARAMETER][MAX_LENGTH_PARAMETER]; /*storage of cut string */
extern  char tempstr[BUFFER_SIZE];/*Variable for debug*/
extern  char uartString[BUFFER_SIZE]; /* variable for storage received a complete string via UART */ 

extern uint8_t can_errorCode; /* error code for CAN-communication */
extern uint8_t general_errorCode; /*general error code */
extern uint8_t mailbox_errorCode; /* error code for Message Object Block */
extern uint8_t uart_errorCode; /* error code for UART-communication */

extern volatile unsigned char BufferFull;/*variable for Uart Interrupt*/
extern volatile unsigned char canReady; /* variable for CAN ISR */

extern volatile unsigned char timer0Ready;/*variable for Timer  Interrupt*/
extern volatile unsigned char timer0AReady;/*variable for Timer0 Output Compare A  Interrupt*/
extern volatile unsigned char uartReady;/*variable for Uart Interrupt*/

extern uint8_t mob; /*variable  for Message Object Block in the interrupt routine*/
extern unsigned char nextCharPos;/* variable for the storage of data in serial string variable */

extern uint16_t subscribe_ID[MAX_LENGTH_SUBSCRIBE];
extern uint16_t subscribe_mask[MAX_LENGTH_SUBSCRIBE];


extern uint8_t ptr_buffer_in; /*pointer for write in ring_buffer*/
extern uint8_t ptr_buffer_out; /*pointer for read in ring_buffer*/
extern uint8_t ptr_subscribe; /* pointer of variable subscribe_ID and subscribe_mask */

extern const uint8_t serial_error_number[];
extern const char *serial_error[];


#endif


