#ifndef __RS475_H
#define __RS475_H

#include "systick.h"
#include "dpm32m0xx.h"


#define EN_UART1_RX 1
#define RS485_TX_EN(x)\
  do\
  {\
    if(x==0)\
      GPIOB->BIT_RST = GPIO_PIN_11;\
    else\
      GPIOB->BIT_SET_RST = GPIO_PIN_11;\
  }while(0);


void UART1_IRQHandler_Config(void);
void RS485_Init(void);
void RS485_Send_Data(uint8_t *buf, uint8_t len, uint32_t timeOut);
void RS485_Receive_Data(uint8_t *buf, uint16_t *len);


#endif


