Skip to content

Commit 50991c1

Browse files
committed
RPC: fix examples using RPC as dependency
1 parent 12bc14d commit 50991c1

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

libraries/Portenta_lvgl/examples/KeyboardMouseController_rpc_m4/KeyboardMouseController_rpc_m4.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "USBHost.h"
2-
#include "RPC_internal.h"
2+
#include "RPC.h"
33

44
#ifndef CORE_CM4
55
#error "This sketch should be compiled for Portenta (M4 core)"
@@ -24,7 +24,7 @@ static const char tabB[] = "\t _+{}|~:\"~<>?";
2424
// route the key event to stdin
2525

2626
static void stdin_recvchar(char ch) {
27-
RPC1.call("on_key", ch);
27+
RPC.call("on_key", ch);
2828
}
2929

3030
static int process_key(tusbh_ep_info_t* ep, const uint8_t* keys)
@@ -71,7 +71,7 @@ static int process_mouse(tusbh_ep_info_t* ep, const uint8_t* mouse)
7171
uint8_t btn = mouse[0];
7272
int8_t x = ((int8_t*)mouse)[1];
7373
int8_t y = ((int8_t*)mouse)[2];
74-
RPC1.call("on_mouse", btn, x, y);
74+
RPC.call("on_mouse", btn, x, y);
7575
}
7676

7777
static const tusbh_boot_key_class_t cls_boot_key = {
@@ -105,7 +105,7 @@ static const tusbh_class_reg_t class_table[] = {
105105
void setup()
106106
{
107107
Serial1.begin(115200);
108-
RPC1.begin();
108+
RPC.begin();
109109
usb.Init(USB_CORE_ID_HS, class_table);
110110
//usb.Init(USB_CORE_ID_FS, class_table);
111111
}

libraries/Portenta_lvgl/examples/lvgl_rpc_usb_mouse/lvgl_rpc_usb_mouse.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "Portenta_lvgl.h"
2-
#include "RPC_internal.h"
2+
#include "RPC.h"
33
#include "USBHost.h"
44

55
int16_t touchpad_x = 0;
@@ -63,10 +63,10 @@ bool button_read(lv_indev_drv_t * drv, lv_indev_data_t*data){
6363
}
6464
void setup() {
6565
// put your setup code here, to run once:
66-
RPC1.begin();
66+
RPC.begin();
6767
Serial1.begin(115200);
68-
RPC1.bind("on_mouse", on_mouse);
69-
RPC1.bind("on_key", on_key);
68+
RPC.bind("on_mouse", on_mouse);
69+
RPC.bind("on_key", on_key);
7070
portenta_init_video();
7171

7272
// Mouse pointer init

0 commit comments

Comments
 (0)