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: Source/hw.h
- Revision:
- 24:761c30334cf4
- Parent:
- 23:7ca590427f0e
- Child:
- 26:a577c4b69fe0
diff -r 7ca590427f0e -r 761c30334cf4 Source/hw.h --- a/Source/hw.h Tue Mar 19 19:25:39 2019 +0000 +++ b/Source/hw.h Thu Mar 21 19:28:22 2019 +0000 @@ -8,32 +8,33 @@ #define __HW #if 0 -// This is used when running on the real SartCap board -// Digital I/O lines -#define LIGHT_SENSE p3 // Light Sense input -#define LIGHT_SENSE_ENABLE p5 // Enable Light Sense Circuit - -#define CAP_SENSE_LED p2 // Enable Cap Sense LED -#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_CAP_SENSE 2 /* p1 or Analog2 */ - + // This is used when running on the real SartCap board + // Digital I/O lines + #define LIGHT_SENSE p3 // Light Sense input + #define LIGHT_SENSE_ENABLE p5 // Enable Light Sense Circuit + + #define CAP_SENSE_LED p2 // Enable Cap Sense LED + #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_CAP_SENSE 2 /* p1 or Analog2 */ + #define ADC_CHAN_LIGHT_SENSE 4 #else -// this is used when simulating on a nRF51_DK -// Digital I/O lines -#define LIGHT_SENSE p3 // Light Sense input -#define LIGHT_SENSE_ENABLE p5 // Enable Light Sense Circuit - -#define CAP_SENSE_LED p2 // Enable Cap Sense LED -#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_CAP_SENSE 2 /* p1 or Analog2 */ + // this is used when simulating on a nRF51_DK + // Digital I/O lines + #define LIGHT_SENSE p3 // Light Sense input + #define LIGHT_SENSE_ENABLE p5 // Enable Light Sense Circuit + + #define CAP_SENSE_LED p2 // Enable Cap Sense LED + #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_CAP_SENSE 2 /* p1 or Analog2 */ + #define ADC_CHAN_LIGHT_SENSE 4 #endif