You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
3.0 KiB
41 lines
3.0 KiB
//#############################################################################################################################################################################################################
|
|
#ifndef _INC_RSLINK_H_
|
|
#define _INC_RSLINK_H_
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
#include <inttypes.h>
|
|
#include "SYSTEM.h"
|
|
#include "USART1.h"
|
|
#include "IDIBUS_IMPL.h"
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
// DELAYS FOR LEDS status
|
|
|
|
#define RSLINK_LED_T1_DEFAULT_S 15UL
|
|
#define RSLINK_LED_T2_DEFAULT_S 60UL
|
|
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//USART_INTERFACE_TYPE *USI;
|
|
//USART_IDIBUS_ROUTINE_TYPE *USIID;
|
|
uint8_t RS_Address;
|
|
uint8_t RS_SpeedCode;
|
|
uint8_t RS_NeedSpeedChangeFlag; // ôëàã äëÿ èçìåíåíèÿ ñêîðîñòè
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
uint8_t RxMesageBuf[IDIMMES_MAX_MES_SIZE]; //RX buffer for copy
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
void RSLink_Init(/*USART_HANDLER_TYPE *USART_INTERFACE, USART_IDIBUS_ROUTINE_TYPE *USART_ID_INTERFACE*/);
|
|
uint8_t RSLink_SpeedCheckAndUpdate(void);
|
|
void RSLink_AddressCheckAndUpdate(void);
|
|
void RSLink_Handler(void);
|
|
void RSLink_SendSMES();
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
void RSLink_StatusLedInit(void);
|
|
void RSLink_StatusLedSetOn(void);
|
|
void RSLink_StatusLedSetOff(void);
|
|
|
|
void RSLink_DipsInit(void);
|
|
uint8_t RSLink_AddrDecode(void);
|
|
uint8_t RSLink_SpeedDecode(void);
|
|
uint8_t RSLink_TypeDecode(void);
|
|
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
#endif // #ifndef _INC_RSLINK_H_
|
|
//#############################################################################################################################################################################################################
|