More advanced NanoService Demo for LPC1768 App Board using OMA Lightweight Objects
Dependencies: Beep C12832_lcd EthernetInterface LM75B MMA7660 mbed-rtos mbed nsdl_lib
Fork of LWM2M_NanoService_Ethernet by
nsdl_support.h@20:84ee332ba360, 2014-04-08 (annotated)
- Committer:
- sstark
- Date:
- Tue Apr 08 01:02:06 2014 +0000
- Revision:
- 20:84ee332ba360
- Parent:
- 2:7e489126fe7a
Properly use the RGB_LED define to exclude the creation of the RGB resource, and encapsulate the RGB PwmOut object in an RBG class to avoid having the pins activated when they were initialized statically.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 2:7e489126fe7a | 1 | // Support functions for the NSDL library |
bogdanm | 2:7e489126fe7a | 2 | |
bogdanm | 2:7e489126fe7a | 3 | #ifndef NSDL_SUPPORT_H |
bogdanm | 2:7e489126fe7a | 4 | #define NSDL_SUPPORT_H |
bogdanm | 2:7e489126fe7a | 5 | |
bogdanm | 2:7e489126fe7a | 6 | #include "mbed.h" |
bogdanm | 2:7e489126fe7a | 7 | #include <stdint.h> |
bogdanm | 2:7e489126fe7a | 8 | #include "sn_nsdl.h" |
bogdanm | 2:7e489126fe7a | 9 | #include "sn_coap_header.h" |
bogdanm | 2:7e489126fe7a | 10 | #include "sn_coap_protocol.h" |
bogdanm | 2:7e489126fe7a | 11 | #include "sn_nsdl_lib.h" |
bogdanm | 2:7e489126fe7a | 12 | |
bogdanm | 2:7e489126fe7a | 13 | typedef uint8_t (*sn_grs_dyn_res_callback_t)(sn_coap_hdr_s *, sn_nsdl_addr_s *, sn_proto_info_s *); |
bogdanm | 2:7e489126fe7a | 14 | |
bogdanm | 2:7e489126fe7a | 15 | extern "C" void *nsdl_alloc(uint16_t size); |
bogdanm | 2:7e489126fe7a | 16 | extern "C" void nsdl_free(void* ptr_to_free); |
bogdanm | 2:7e489126fe7a | 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); |
bogdanm | 2:7e489126fe7a | 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); |
bogdanm | 2:7e489126fe7a | 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); |
bogdanm | 2:7e489126fe7a | 20 | void nsdl_clean_register_endpoint(sn_nsdl_ep_parameters_s **endpoint_structure); |
bogdanm | 2:7e489126fe7a | 21 | void nsdl_init(); |
bogdanm | 2:7e489126fe7a | 22 | void nsdl_event_loop(); |
bogdanm | 2:7e489126fe7a | 23 | |
bogdanm | 2:7e489126fe7a | 24 | #endif // NSDL_SUPPORT_H |