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
hw.h
- Committer:
- sgetz7908
- Date:
- 2017-05-23
- Revision:
- 7:090f9eea7b3c
- Parent:
- 4:1bfa16834dd4
- Child:
- 9:0b017e956142
File content as of revision 7:090f9eea7b3c:
// // Hardware definitions for the Nordic eTwist Board // // SPG 12/13/2016 // #ifndef __HW #define __HW // 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 */ 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); void init_clock(uint32_t s); void set_time_offset(uint32_t s); uint32_t read_time_correction(void); char * uli2a(uint32_t num); char * char2hex(char c); char * char2hex(uint32_t n, int digits); #endif // #ifndef __HW