coap 18
This commit is contained in:
parent
aaaa0aa138
commit
365fe31b02
|
@ -46,8 +46,7 @@
|
|||
#include <string.h>
|
||||
#include "contiki.h"
|
||||
#include "jsonparse.h"
|
||||
/* Only coap 13 for now */
|
||||
#include "er-coap-13.h"
|
||||
#include "er-coap.h"
|
||||
#include "generic_resource.h"
|
||||
|
||||
/* Error-handling macro */
|
||||
|
@ -125,7 +124,8 @@ void generic_handler
|
|||
const uint8_t *bytes = NULL;
|
||||
const uint16_t *accept = NULL;
|
||||
uint16_t a_ctype = REST.type.APPLICATION_JSON;
|
||||
uint16_t c_ctype = REST.get_header_content_type (request);
|
||||
uint16_t c_ctype;
|
||||
n_acc = REST.get_header_content_type (request, &c_ctype);
|
||||
|
||||
/* Seems like accepted type is currently unsupported? */
|
||||
n_acc = REST.get_header_accept (request, &accept);
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
#include "time.h"
|
||||
#include "time_resource.h"
|
||||
#include "jsonparse.h"
|
||||
/* Only coap 13 for now */
|
||||
#include "er-coap-13.h"
|
||||
#include "er-coap.h"
|
||||
#include "generic_resource.h"
|
||||
|
||||
size_t time_to_string (const char *name, uint8_t is_json, char *buf, size_t bs)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#ifndef time_resource_h
|
||||
#define time_resource_h
|
||||
#include "contiki.h"
|
||||
#include "erbium.h"
|
||||
#include "rest-engine.h"
|
||||
|
||||
extern resource_t resource_timestamp;
|
||||
extern resource_t resource_localtime;
|
||||
|
|
|
@ -23,6 +23,7 @@ uint16_t analog5_voltage = 0;
|
|||
|
||||
void setup (void)
|
||||
{
|
||||
arduino_pwm_timer_init ();
|
||||
rest_init_engine ();
|
||||
rest_activate_resource (&resource_led_pwm);
|
||||
rest_activate_resource (&resource_led_period);
|
||||
|
|
Loading…
Reference in a new issue