Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 024cf36

Browse files
RPC: Add a function to return the current CPU ID.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
1 parent 105c172 commit 024cf36

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

‎libraries/RPC/src/RPC.h‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,26 @@ class RPCClass : public Stream, public rpc::detail::dispatcher {
4242
for (int i = 0; i< 10; i++) {
4343
clients[i] = NULL;
4444
}
45-
};
45+
}
4646
int begin();
47-
void end() {};
47+
void end() {
48+
49+
}
4850
int available(void) {
4951
return rx_buffer.available();
50-
};
52+
}
5153
int peek(void) {
5254
return rx_buffer.peek();
5355
}
5456
int read(void) {
5557
return rx_buffer.read_char();
5658
}
57-
void flush(void) {};
59+
void flush(void) {
60+
61+
}
62+
uint32_t cpu_id() {
63+
return HAL_GetCurrentCPUID();
64+
}
5865
size_t write(uint8_t c);
5966
size_t write(const uint8_t *buf, size_t len, bool raw = true);
6067

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /