Skip to content

Commit 31bde97

Browse files
committed
x8: rpc: fix various warnings
1 parent c3f702b commit 31bde97

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

libraries/RPC/src/RPC.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ int RPCClass::begin(long unsigned int np, uint16_t nd) {
178178
* The rpmsg service is initiate by the remote processor, on H7 new_service_cb
179179
* callback is received on service creation. Wait for the callback
180180
*/
181-
OPENAMP_Wait_EndPointready(&rp_endpoints[ENDPOINT_RAW], HAL_GetTick() + 500);
182-
OPENAMP_Wait_EndPointready(&rp_endpoints[ENDPOINT_RESPONSE], HAL_GetTick() + 500);
181+
OPENAMP_Wait_EndPointready(&rp_endpoints[ENDPOINT_RAW], millis() + 500);
182+
OPENAMP_Wait_EndPointready(&rp_endpoints[ENDPOINT_RESPONSE], millis() + 500);
183183

184184
// Send first dummy message to enable the channel
185185
uint8_t message = 0x00;
@@ -241,7 +241,7 @@ void RPCClass::response() {
241241
}
242242

243243
while (true) {
244-
osEvent v = osSignalWait(0, osWaitForever);
244+
osSignalWait(0, osWaitForever);
245245

246246
{
247247
RPCLIB_MSGPACK::unpacker pac;
@@ -286,7 +286,7 @@ void RPCClass::dispatch() {
286286
dispatcherThreadId = osThreadGetId();
287287

288288
while (true) {
289-
osEvent v = osSignalWait(0, osWaitForever);
289+
osSignalWait(0, osWaitForever);
290290

291291
{
292292
RPCLIB_MSGPACK::unpacker pac;

libraries/openamp_arduino/src/openamp.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,14 @@ int OPENAMP_check_for_message(void)
167167
return MAILBOX_Poll(rvdev.vdev);
168168
}
169169

170-
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept, size_t timeout)
170+
unsigned long millis();
171+
172+
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept, size_t deadline)
171173
{
172-
while(!is_rpmsg_ept_ready(rp_ept) && (HAL_GetTick() < timeout)) {
174+
while(!is_rpmsg_ept_ready(rp_ept) && (millis() < deadline)) {
173175
MAILBOX_Poll(rvdev.vdev);
174176
}
175-
if (HAL_GetTick() >= timeout) {
177+
if (millis() >= deadline) {
176178
printf("OPENAMP_Wait_EndPointready %X timed out\n\r", (unsigned int)rp_ept);
177179
}
178180
}

libraries/openamp_arduino/src/openamp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
4949
int OPENAMP_check_for_message(void);
5050

5151
/* Wait loop on endpoint ready ( message dest address is know)*/
52-
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept, size_t timeout);
52+
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept, size_t deadline);
5353

5454
#ifdef __cplusplus
5555
}

0 commit comments

Comments
 (0)