Commit e7719f80 authored by Pradnya Bhangle's avatar Pradnya Bhangle
Browse files

new enum dbc

parent 5b70e421
VERSION ""
NS_ :
BA_
BA_DEF_
BA_DEF_DEF_
BA_DEF_DEF_REL_
BA_DEF_REL_
BA_DEF_SGTYPE_
BA_REL_
BA_SGTYPE_
BO_TX_BU_
BU_BO_REL_
BU_EV_REL_
BU_SG_REL_
CAT_
CAT_DEF_
CM_
ENVVAR_DATA_
EV_DATA_
FILTER
NS_DESC_
SGTYPE_
SGTYPE_VAL_
SG_MUL_VAL_
SIGTYPE_VALTYPE_
SIG_GROUP_
SIG_TYPE_REF_
SIG_VALTYPE_
VAL_
VAL_TABLE_
BA_
BA_DEF_
BA_DEF_DEF_
BA_DEF_DEF_REL_
BA_DEF_REL_
BA_DEF_SGTYPE_
BA_REL_
BA_SGTYPE_
BO_TX_BU_
BU_BO_REL_
BU_EV_REL_
BU_SG_REL_
CAT_
CAT_DEF_
CM_
ENVVAR_DATA_
EV_DATA_
FILTER
NS_DESC_
SGTYPE_
SGTYPE_VAL_
SG_MUL_VAL_
SIGTYPE_VALTYPE_
SIG_GROUP_
SIG_TYPE_REF_
SIG_VALTYPE_
VAL_
VAL_TABLE_
BS_:
......@@ -71,8 +71,8 @@ BO_ 82 LF_GEO_BT_LAT_LONG: 8 LF_GEO
SG_ GEO_BT_long_debug : 32|32@1- (-0.000001,0) [0|0] "Degree" LF_BRIDGE
BO_ 83 LF_GEO_BT_COMP: 2 LF_GEO
SG_ GEO_BT_comp_debug : 0|10@1+ (1,0) [0|0] "Degree" LF_BRIDGE
SG_ GPS_FIX : 10|3@1+ (1,0) [0|0] "" LF_BRIDGE
SG_ GEO_BT_comp_debug : 0|10@1+ (1,0) [0|0] "Degree" LF_BRIDGE,LF_DEBUG_NODE
SG_ GPS_FIX : 10|3@1+ (1,0) [0|0] "" LF_BRIDGE,LF_DEBUG_NODE
BO_ 84 LF_GEO_DATA: 2 LF_GEO
SG_ direction_geo : 0|3@1+ (1,0) [0|4] "GeoDirection" LF_DRIVER,LF_BRIDGE
......
/*
* c_uart.cpp
*
* Created on: Feb 19, 2019
* Author: Niraj93
*/
#include "c_uart.h"
#include "uart2.hpp"
#include "uart3.hpp"
//Global Uart pointers
Uart2 *u2 = NULL;
Uart3 *u3 = NULL;
void uart_init(uart u,int baudRate,int rxQSize,int txQSize)
{
switch(u)
{
case uart2: u2 = &Uart2::getInstance();
u2->init(baudRate,rxQSize,txQSize);break;
case uart3: u3 = &Uart3::getInstance();
u3->init(baudRate,rxQSize,txQSize);break;
}
}
bool uart_getchar(uart u,char *byte, uint32_t timeout_ms)
{
switch(u)
{
case uart2: return u2->getChar(byte, timeout_ms);
case uart3: return u3->getChar(byte, timeout_ms);
}
}
bool uart_putchar(uart u,char out, uint32_t timeout_ms)
{
switch(u)
{
case uart2: return u2->putChar(out,timeout_ms);
case uart3: return u3->putChar(out,timeout_ms);
}
}
/*
* c_uart.h
*
* Created on: Feb 19, 2019
* Author: Niraj93
*/
#ifndef C_UART_H_
#define C_UART_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdbool.h>
typedef enum
{
uart2 = 2,
uart3
}uart;
void uart_init(uart u,int baudRate,int rxQSize,int txQSize);
bool uart_getchar(uart u,char *byte, uint32_t timeout_ms);
bool uart_putchar(uart u,char out, uint32_t timeout_ms);
#ifdef __cplusplus
}
#endif
#endif /* C_UART_H_ */
/*
* sLCD.c
*
* Created on: Apr 19, 2019
* Author: MAVERICK
*/
#include "sLCD.h"
#include "c_uart.h"
#include "string.h"
#define LCD_INIT_CMD 0xF0
//#define LCD_RESPONSE_CMD "$"
#define UART_TIMEOUT_MS 0
void initLCD(uart uart_portNo)
{
bool status = uart_putchar(uart_portNo, LCD_INIT_CMD, UART_TIMEOUT_MS);
}
void displayOnLCD(uint8_t uart_portNo)
{
}
bool isLCD_Ok(uart uart_portNo)
{
unsigned char uart_rbuf;
if(!uart_getchar(uart_portNo, &uart_rbuf, UART_TIMEOUT_MS))
{
return true;
}
return false;
}
void clrLCD(uint8_t uart_portNo)
{
}
/*
* sLCD.h
*
* Created on: Apr 19, 2019
* Author: MAVERICK
*/
#ifndef SLCD_H_
#define SLCD_H_
#include <stdbool.h>
#include "c_uart.h"
#include <stdint.h>
/*Basic Functions*/
void initLCD(uart uart_portNo);
void displayOnLCD(uart uart_portNo);
bool isLCD_Ok(uart uart_portNo);
void clrLCD(uart uart_portNo);
/*Advance Functions*/
#endif /* SLCD_H_ */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment