17 #include <core/dependencies.h>
19 #ifdef POK_NEEDS_MIDDLEWARE
20 #ifdef POK_NEEDS_BLACKBOARDS
23 #include <core/event.h>
24 #include <libc/string.h>
25 #include <middleware/blackboard.h>
28 extern char pok_blackboards_data[1024];
31 pok_ret_t pok_blackboard_display (
const pok_blackboard_id_t
id,
33 const pok_port_size_t len)
36 if (
id > POK_CONFIG_NB_BLACKBOARDS)
38 return POK_ERRNO_EINVAL;
43 return POK_ERRNO_EINVAL;
46 if (len > pok_blackboards[
id].size)
48 return POK_ERRNO_SIZE;
51 if (pok_blackboards[
id].ready != TRUE)
53 return POK_ERRNO_EINVAL;
56 pok_event_lock (pok_blackboards[
id].lock);
58 memcpy (&pok_blackboards_data[pok_blackboards[
id].index], message, len);
60 pok_event_unlock (pok_blackboards[
id].lock);