Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nRF51822
Diff: hw.h
- Revision:
- 4:1bfa16834dd4
- Parent:
- 2:def2c045c43a
- Child:
- 7:090f9eea7b3c
--- a/hw.h Tue Dec 20 15:13:35 2016 +0000 +++ b/hw.h Tue Jan 24 16:29:51 2017 +0000 @@ -9,16 +9,17 @@ // Digital I/O lines #define PRESS p3 // Will be shorted to ground when pressed. Need internal pull-up -#define SOUND_ANALOG p1 // Analog signal from opto sensor +#define SOUND_ANALOG p1 // Analog signal from sound sensor #define VDD_ENABLE p0 // Analog voltage on when hi #define LED p18 // LED on when hi // ADC defines #define ADC_CHAN_BATTERY 0 /* no I/O pin, done internally */ -#define ADC_CHAN_OPTO 2 /* p1 or Analog2 */ +#define ADC_CHAN_SOUND 2 /* p1 or Analog2 */ void delay_ms(uint32_t volatile number_of_ms); +uint16_t adc_read(int chan, int num_readings); uint16_t read_battery_voltage(void); uint32_t read_clock(void);