27 lines
540 B
C
27 lines
540 B
C
#ifndef GPIO_H
|
|
#define GPIO_H
|
|
|
|
#include "device_ring_buffer.h"
|
|
#include "device_adc.h"
|
|
#include "device_address.h"
|
|
#include "UART.h"
|
|
#include "modbus.h"
|
|
#include "timer.h"
|
|
|
|
#define PIN_COIL1 PD4
|
|
#define PIN_COIL2 PD5
|
|
#define PIN_COIL3 PD6
|
|
#define PIN_COIL4 PD7
|
|
|
|
#define PIN_DISCRETE_INPUT_1 PB0
|
|
#define PIN_DISCRETE_INPUT_2 PB1
|
|
#define PIN_DISCRETE_INPUT_3 PB2
|
|
#define PIN_DISCRETE_INPUT_4 PB3
|
|
|
|
void gpio_init(void);
|
|
uint8_t gpio_read(uint8_t pin);
|
|
void gpio_write(uint8_t pin, uint8_t value);
|
|
|
|
|
|
#endif /*GPIO_H*/
|