osd-contiki/examples/osd/arduino-sketch/led_pwm.h
Ralf Schlatterbeck abdf6f8c6b Refactor A/D conversion in adc.c
Now the necessary settings are in adc.h. Refactored to allow repeated
ADC reads without reinitialization. Arduino allows setting
analogReference, this is now also implemented.
ADC is now initialized to sane values in apps/arduino/arduino-process.c
dev/arduino/arduino-compat.h now has all hardware independent settings
for arduino (some moved from platform/osd-merkur/dev/hw-arduino.h).
turnOffPWM re-implemented with hw_timer, removed from wiring_digital.c
ADC-specific arduino stuff moved to arduino-compat.h
Arduinos wiring_analog no longer necessary.
arduino-sketch example now reads analog inputs 1 and 5 using analogRead.
2014-11-19 13:53:32 +01:00

36 lines
699 B
C

/**
* \defgroup Arduino LED PWM example
*
* Resource definition for Arduino LED PWM module
*
* @{
*/
/**
* \file
* Resource definitions for the Arduino LED PWM module
*
* \author
* Ralf Schlatterbeck <rsc@tux.runtux.com>
*/
#ifndef led_pwm_h
#define led_pwm_h
#include "contiki.h"
#include "contiki-net.h"
#include "erbium.h"
#include "er-coap-13.h"
extern uint8_t pwm;
extern uint8_t period_100ms;
extern uint16_t analog1_voltage;
extern uint16_t analog5_voltage;
extern resource_t resource_led_pwm;
extern resource_t resource_led_period;
extern resource_t resource_analog1_voltage;
extern resource_t resource_analog5_voltage;
#endif // led_pwm_h
/** @} */