Skip to content

Commit a73ff53

Browse files
author
Ondrej Wisniewski
committed
2 parents 9fe9d0c + 5aed2ef commit a73ff53

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/data_types.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ typedef struct
5656
/* [GPIO drv] */
5757
uint8_t gpio_num_relays;
5858
uint8_t gpio_active_value;
59-
uint8_t relay1_gpio_pin;
60-
uint8_t relay2_gpio_pin;
61-
uint8_t relay3_gpio_pin;
62-
uint8_t relay4_gpio_pin;
63-
uint8_t relay5_gpio_pin;
64-
uint8_t relay6_gpio_pin;
65-
uint8_t relay7_gpio_pin;
66-
uint8_t relay8_gpio_pin;
59+
uint16_t relay1_gpio_pin;
60+
uint16_t relay2_gpio_pin;
61+
uint16_t relay3_gpio_pin;
62+
uint16_t relay4_gpio_pin;
63+
uint16_t relay5_gpio_pin;
64+
uint16_t relay6_gpio_pin;
65+
uint16_t relay7_gpio_pin;
66+
uint16_t relay8_gpio_pin;
6767

6868
/* [Sainsmart drv] */
6969
uint8_t sainsmart_num_relays;

src/relay_drv_gpio.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#define GPIO_BASE_FILE GPIO_BASE_DIR"gpio"
5454

5555

56-
static uint8_t pins[] =
56+
static uint16_t pins[] =
5757
{
5858
0, // dummy
5959
0, // pin 1
@@ -85,7 +85,7 @@ int set_relay_generic_gpio(char* portname, uint8_t relay, relay_state_t relay_st
8585
* -1 - fail
8686
* -2 - already exported
8787
*********************************************************/
88-
static int do_export(uint8_t pin)
88+
static int do_export(uint16_t pin)
8989
{
9090
int fd;
9191
char b[64];
@@ -151,7 +151,7 @@ static int do_export(uint8_t pin)
151151
* Return: 0 - success
152152
* -1 - fail
153153
*********************************************************/
154-
static int do_unexport(uint8_t pin)
154+
static int do_unexport(uint16_t pin)
155155
{
156156
int fd;
157157
char b[64];
@@ -261,7 +261,7 @@ int get_relay_generic_gpio(char* portname, uint8_t relay, relay_state_t* relay_s
261261
int fd;
262262
char b[64];
263263
char d[1];
264-
uint8_t pin;
264+
uint16_t pin;
265265

266266
if (relay<FIRST_RELAY || relay>(FIRST_RELAY+g_num_relays-1))
267267
{
@@ -324,7 +324,7 @@ int set_relay_generic_gpio(char* portname, uint8_t relay, relay_state_t relay_st
324324
int fd;
325325
char b[64];
326326
char d[1];
327-
uint8_t pin;
327+
uint16_t pin;
328328

329329
if (relay<FIRST_RELAY || relay>(FIRST_RELAY+g_num_relays-1))
330330
{

0 commit comments

Comments
 (0)