Skip to content

Commit 19a80fd

Browse files
committed
update apps and touch enum names
1 parent 6f09b00 commit 19a80fd

File tree

6 files changed

+16
-19
lines changed

6 files changed

+16
-19
lines changed

examples/lvgl/lvgl_driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void screen_lvgl_driver(lv_display_t* disp, const lv_area_t* area,
3131
lv_display_flush_ready(disp); /* Indicate you are ready with the flushing*/
3232
}
3333

34-
static void touch_event(int status, uint16_t x, uint16_t y) {
34+
static void touch_event(libtock_touch_status_t status, uint16_t x, uint16_t y) {
3535
touch_status = status;
3636
touch_x = x;
3737
touch_y = y;

examples/tests/touch/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
libtock_touch_event_t* multi_touch_buffer;
99

10-
static void touch_event(int status, uint16_t x, uint16_t y) {
10+
static void touch_event(libtock_touch_status_t status, uint16_t x, uint16_t y) {
1111
switch (status) {
1212
case LIBTOCK_TOUCH_STATUS_PRESSED: {
1313
printf("pressed ");

examples/tests/udp/udp_rx/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ void print_ipv6(ipv6_addr_t* ipv6_addr) {
3232
printf("%02x%02x", ipv6_addr->addr[14], ipv6_addr->addr[15]);
3333
}
3434

35-
static void callback(statuscode_t status,
35+
static void callback(returncode_t ret,
3636
int payload_len) {
3737

38-
returncode_t ret = tock_status_to_returncode(status);
3938
if (ret != RETURNCODE_SUCCESS) {
4039
printf("Error in receiving packet: %d\n", ret);
4140
return;

examples/tests/udp/udp_virt_rx_tests/app1/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ void print_ipv6(ipv6_addr_t* ipv6_addr) {
2929
printf("%02x%02x", ipv6_addr->addr[14], ipv6_addr->addr[15]);
3030
}
3131

32-
static void callback(statuscode_t status,
32+
static void callback(returncode_t ret,
3333
int payload_len) {
3434

35-
returncode_t ret = tock_status_to_returncode(status);
3635
if (ret != RETURNCODE_SUCCESS) {
3736
printf("Error in receiving packet: %d\n", ret);
3837
return;

examples/tests/udp/udp_virt_rx_tests/app2/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ void print_ipv6(ipv6_addr_t* ipv6_addr) {
2929
printf("%02x%02x", ipv6_addr->addr[14], ipv6_addr->addr[15]);
3030
}
3131

32-
static void callback(statuscode_t status,
32+
static void callback(returncode_t ret,
3333
int payload_len) {
3434

35-
returncode_t ret = tock_status_to_returncode(status);
3635
if (ret != RETURNCODE_SUCCESS) {
3736
printf("Error in receiving packet: %d\n", ret);
3837
return;

libtock/sensors/touch.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ extern "C" {
99

1010
// Touch status.
1111
typedef enum {
12-
TOUCH_STATUS_RELEASED = 0,
13-
TOUCH_STATUS_PRESSED = 1,
14-
TOUCH_STATUS_MOVED = 2,
15-
TOUCH_STATUS_UNSTARTED = 3,
12+
LIBTOCK_TOUCH_STATUS_RELEASED = 0,
13+
LIBTOCK_TOUCH_STATUS_PRESSED = 1,
14+
LIBTOCK_TOUCH_STATUS_MOVED = 2,
15+
LIBTOCK_TOUCH_STATUS_UNSTARTED = 3,
1616
} libtock_touch_status_t;
1717

1818
// Gesture types.
1919
typedef enum {
20-
GESTURE_NO = 0,
21-
GESTURE_SWIPE_UP = 1,
22-
GESTURE_SWIPE_DOWN = 2,
23-
GESTURE_SWIPE_LEFT = 3,
24-
GESTURE_SWIPE_RIGHT = 4,
25-
GESTURE_ZOOM_IN = 5,
26-
GESTURE_ZOOM_OUT = 6,
20+
LIBTOCK_TOUCH_GESTURE_NO = 0,
21+
LIBTOCK_TOUCH_GESTURE_SWIPE_UP = 1,
22+
LIBTOCK_TOUCH_GESTURE_SWIPE_DOWN = 2,
23+
LIBTOCK_TOUCH_GESTURE_SWIPE_LEFT = 3,
24+
LIBTOCK_TOUCH_GESTURE_SWIPE_RIGHT = 4,
25+
LIBTOCK_TOUCH_GESTURE_ZOOM_IN = 5,
26+
LIBTOCK_TOUCH_GESTURE_ZOOM_OUT = 6,
2727
} libtock_touch_gesture_t;
2828

2929
// Function signature for touch data callback.

0 commit comments

Comments
 (0)