Demo for the problem with nsdl_lib and rtos on FRDM- K64F

Dependencies:   C12832_lcd WiflyInterface mbed-rtos mbed nsdl_lib

Committer:
lvwei1990
Date:
Fri Jan 16 06:37:29 2015 +0000
Revision:
0:e41e45a41f0f
Demo for the problem with nsdl_lib and rtos on FRDM- K64F

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lvwei1990 0:e41e45a41f0f 1 // Support functions for the NSDL library
lvwei1990 0:e41e45a41f0f 2
lvwei1990 0:e41e45a41f0f 3 #ifndef NSDL_SUPPORT_H
lvwei1990 0:e41e45a41f0f 4 #define NSDL_SUPPORT_H
lvwei1990 0:e41e45a41f0f 5
lvwei1990 0:e41e45a41f0f 6 #include "mbed.h"
lvwei1990 0:e41e45a41f0f 7 #include <stdint.h>
lvwei1990 0:e41e45a41f0f 8 #include "sn_nsdl.h"
lvwei1990 0:e41e45a41f0f 9 #include "sn_coap_header.h"
lvwei1990 0:e41e45a41f0f 10 #include "sn_coap_protocol.h"
lvwei1990 0:e41e45a41f0f 11 #include "sn_nsdl_lib.h"
lvwei1990 0:e41e45a41f0f 12
lvwei1990 0:e41e45a41f0f 13 typedef uint8_t (*sn_grs_dyn_res_callback_t)(sn_coap_hdr_s *, sn_nsdl_addr_s *, sn_proto_info_s *);
lvwei1990 0:e41e45a41f0f 14
lvwei1990 0:e41e45a41f0f 15 extern "C" void *nsdl_alloc(uint16_t size);
lvwei1990 0:e41e45a41f0f 16 extern "C" void nsdl_free(void* ptr_to_free);
lvwei1990 0:e41e45a41f0f 17 void nsdl_create_static_resource(sn_nsdl_resource_info_s *resource_structure, uint16_t pt_len, uint8_t *pt, uint16_t rpp_len, uint8_t *rpp_ptr, uint8_t *rsc, uint16_t rsc_len);
lvwei1990 0:e41e45a41f0f 18 void nsdl_create_dynamic_resource(sn_nsdl_resource_info_s *resource_structure, uint16_t pt_len, uint8_t *pt, uint16_t rpp_len, uint8_t *rpp_ptr, uint8_t is_observable, sn_grs_dyn_res_callback_t callback_ptr, int access_right);
lvwei1990 0:e41e45a41f0f 19 sn_nsdl_ep_parameters_s* nsdl_init_register_endpoint(sn_nsdl_ep_parameters_s *endpoint_structure, uint8_t* name, uint8_t* ypename_ptr, uint8_t *lifetime_ptr);
lvwei1990 0:e41e45a41f0f 20 void nsdl_clean_register_endpoint(sn_nsdl_ep_parameters_s **endpoint_structure);
lvwei1990 0:e41e45a41f0f 21 void nsdl_init();
lvwei1990 0:e41e45a41f0f 22 void nsdl_event_loop();
lvwei1990 0:e41e45a41f0f 23
lvwei1990 0:e41e45a41f0f 24 #endif // NSDL_SUPPORT_H