diff --git a/ports/rp2/mpthreadport.h b/ports/rp2/mpthreadport.h index 4583f6f53..5eb0bff39 100644 --- a/ports/rp2/mpthreadport.h +++ b/ports/rp2/mpthreadport.h @@ -41,7 +41,7 @@ static inline void mp_thread_set_state(struct _mp_state_thread_t *state) { } static inline struct _mp_state_thread_t *mp_thread_get_state(void) { - return core_state[get_core_num()]; + return (struct _mp_state_thread_t *)core_state[get_core_num()]; } static inline void mp_thread_mutex_init(mp_thread_mutex_t *m) {