Exemplo n.º 1
0
void
platform_resources_init(void)
{
  REST_RES_AMBIENT_TEMP_INIT();
  REST_RES_OBJECT_TEMP_INIT();

  REST_RES_HUMIDITY_INIT();
  REST_RES_HUMIDITY_TEMP_INIT();

  REST_RES_PRESSURE_INIT();
  REST_RES_PRESSURE_TEMP_INIT();

  REST_RES_ILLUMINANCE_INIT();

#if WITH_LWM2M
  REST_RES_BATMON_INIT_WITH_PATH(LWM2M_DEVICE_PATH(LWM2M_DEVICE_POWER_VOLTAGE_RESOURCE_ID));
#endif
#if WITH_IPSO_APP_FW
  REST_RES_BATMON_INIT_WITH_PATH(DEVICE_POWER_SUPPLY_ENUM_LINE DEVICE_POWER_SUPPLY_VOLTAGE_RES);
#endif
  REST_RES_BATMON_TEMP_INIT();

  #if WITH_LWM2M
  REST_RES_AMBIENT_TEMP_SO_INSTANCE_INIT();
  REST_RES_OBJECT_TEMP_SO_INSTANCE_INIT();

  REST_RES_HUMIDITY_SO_INSTANCE_INIT();
  REST_RES_HUMIDITY_TEMP_SO_INSTANCE_INIT();

  REST_RES_PRESSURE_SO_INSTANCE_INIT();
  REST_RES_PRESSURE_TEMP_SO_INSTANCE_INIT();

  REST_RES_ILLUMINANCE_SO_INSTANCE_INIT();

  REST_RES_BATMON_TEMP_SO_INSTANCE_INIT();

  lwm2m_set_resources_list(lwm2m_objects_link);
#endif
}
Exemplo n.º 2
0
void
contiki_platform_resources_init(void)
{
  REST_RES_SHT_TEMP_INIT();
  REST_RES_SHT_HUMIDITY_INIT();
  REST_RES_RADIO_LQI_INIT();
  REST_RES_RADIO_RSSI_INIT();
  REST_RES_BUTTON_INIT();
  REST_RES_LED_RED_INIT();
  REST_RES_LED_GREEN_INIT();

  REST_RES_LED_BLUE_INIT();
#if WITH_LWM2M
  REST_RES_BATTERY_INIT_WITH_PATH(LWM2M_DEVICE_PATH(LWM2M_DEVICE_POWER_VOLTAGE_RESOURCE_ID));
#endif
#if WITH_IPSO_APP_FW
  REST_RES_BATTERY_INIT_WITH_PATH(DEVICE_POWER_SUPPLY_ENUM_LINE DEVICE_POWER_SUPPLY_VOLTAGE_RES);
#endif

#if WITH_LWM2M
  REST_RES_SHT_TEMP_SO_INSTANCE_INIT();
  REST_RES_SHT_HUMIDITY_SO_INSTANCE_INIT();
#endif
}