File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212#include < zephyr/drivers/gpio.h>
1313
1414#include " api/HardwareSerial.h"
15- #include " common_types.h"
1615
1716#define lowByte (w ) ((uint8_t ) ((w) & 0xff ))
1817#define highByte (w ) ((uint8_t ) ((w) >> 8 ))
Original file line number Diff line number Diff line change @@ -35,4 +35,6 @@ extend google.protobuf.ServiceOptions {
3535 string service_impl_class_name = 50214 ;
3636 string api_member_name = 50215 ;
3737 repeated string base_services = 50216 ;
38+ string ifc_header_name = 50217 ;
39+ repeated string extra_includes = 50218 ;
3840}
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import "google/protobuf/empty.proto";
1313import "google/protobuf/wrappers.proto" ;
1414
1515service Client {
16+ option (arduino.extra_includes ) = "api/IPAddress.h" ;
17+
1618 rpc ConnectAddress (google.protobuf.Empty ) returns (google.protobuf.Empty ) {
1719 option (arduino.cpp_decl ) = "int connect(IPAddress ip, uint16_t port)" ;
1820 }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2026 TOKITA Hiroshi
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ syntax = "proto3" ;
8+
9+ package arduino.idl ;
10+
11+ enum PinStatus {
12+ LOW = 0 ;
13+ HIGH = 1 ;
14+ CHANGE = 2 ;
15+ FALLING = 3 ;
16+ RISING = 4 ;
17+ }
18+
19+ enum PinMode {
20+ INPUT = 0 ;
21+ OUTPUT = 1 ;
22+ INPUT_PULLUP = 2 ;
23+ INPUT_PULLDOWN = 3 ;
24+ OUTPUT_OPENDRAIN = 4 ;
25+ }
26+
27+ enum BitOrder {
28+ LSBFIRST = 0 ;
29+ MSBFIRST = 1 ;
30+ }
31+
32+ enum IPType {
33+ IPv4 = 0 ;
34+ IPv6 = 1 ;
35+ }
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ enum CanBitRate {
2121}
2222
2323service HardwareCAN {
24+ option (arduino.extra_includes ) = "api/HardwareCAN.h" ;
25+
2426 rpc Begin (google.protobuf.Empty ) returns (google.protobuf.BoolValue ) {
2527 option (arduino.cpp_decl ) = "bool begin(CanBitRate const can_bitrate)" ;
2628 }
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import "google/protobuf/empty.proto";
77import "google/protobuf/wrappers.proto" ;
88
99service HardwareI2C {
10+ option (arduino.ifc_header_name ) = "hardware_i2c_ifc.hpp" ;
11+
1012 rpc Begin (google.protobuf.Empty ) returns (google.protobuf.Empty ) {
1113 option (arduino.cpp_decl ) = "void begin()" ;
1214 }
Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ enum SPIBusMode {
2525}
2626
2727service HardwareSPI {
28+ option (arduino.extra_includes ) = "api/HardwareSPI.h" ;
29+
2830 rpc Transfer (google.protobuf.UInt32Value ) returns (google.protobuf.UInt32Value ) {
2931 option (arduino.cpp_decl ) = "uint8_t transfer(uint8_t data)" ;
3032 }
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import "google/protobuf/empty.proto";
1313import "google/protobuf/wrappers.proto" ;
1414
1515service PluggableUSBModule {
16+ option (arduino.extra_includes ) = "api/PluggableUSB.h" ;
17+
1618 rpc Setup (google.protobuf.Empty ) returns (google.protobuf.BoolValue ) {
1719 option (arduino.cpp_decl ) = "bool setup(USBSetup& setup)" ;
1820 }
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import "google/protobuf/empty.proto";
1313import "google/protobuf/wrappers.proto" ;
1414
1515service Printable {
16+ option (arduino.extra_includes ) = "api/Print.h" ;
17+
1618 rpc PrintTo (google.protobuf.Empty ) returns (google.protobuf.UInt64Value ) {
1719 option (arduino.cpp_decl ) = "size_t printTo(Print& p) const" ;
1820 }
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import "google/protobuf/empty.proto";
1313import "google/protobuf/wrappers.proto" ;
1414
1515service UDP {
16+ option (arduino.extra_includes ) = "api/IPAddress.h" ;
17+
1618 rpc Begin (google.protobuf.UInt32Value ) returns (google.protobuf.UInt32Value ) {
1719 option (arduino.cpp_decl ) = "uint8_t begin(uint16_t port)" ;
1820 }
You can’t perform that action at this time.
0 commit comments