5.2.1 - Updated I2C files
Dependents: mbed-TFT-example-NCS36510 mbed-Accelerometer-example-NCS36510 mbed-Accelerometer-example-NCS36510
Revision 1:f30bdcd2b33b, committed 2017-02-27
- Comitter:
- jacobjohnson
- Date:
- Mon Feb 27 17:45:05 2017 +0000
- Parent:
- 0:098463de4c5d
- Commit message:
- changed the inputscale from 1 to 7 in analogin_api.c. This will need to be changed later, and accessed from the main level, but for now this allows the adc to read a value from 0 to 3.7V, instead of just up to 1V.;
Changed in this revision
targets/TARGET_ONSEMI/TARGET_NCS36510/analogin_api.c | Show annotated file Show diff for this revision Revisions of this file |
diff -r 098463de4c5d -r f30bdcd2b33b targets/TARGET_ONSEMI/TARGET_NCS36510/analogin_api.c --- a/targets/TARGET_ONSEMI/TARGET_NCS36510/analogin_api.c Wed Jan 25 20:34:15 2017 +0000 +++ b/targets/TARGET_ONSEMI/TARGET_NCS36510/analogin_api.c Mon Feb 27 17:45:05 2017 +0000 @@ -7,11 +7,11 @@ * $Rev: * $Date: ****************************************************************************** - * Copyright 2016 Semiconductor Components Industries LLC (d/b/a ON Semiconductor). + * Copyright 2016 Semiconductor Components Industries LLC (d/b/a �ON Semiconductor�). * All rights reserved. This software and/or documentation is licensed by ON Semiconductor * under limited terms and conditions. The terms and conditions pertaining to the software * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf - * (ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software) and + * (�ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software�) and * if applicable the software license agreement. Do not use this software and/or * documentation unless you have carefully read and you agree to the limited terms and * conditions. By using this software and/or documentation, you agree to the limited @@ -88,7 +88,7 @@ /* Single sample, absolute conversion, scale = 1 */ obj->adcReg->CONTROL.WORD = ((0 << ADC_CONTROL_MODE_BIT_POS) | (1 << ADC_CONTROL_MEASTYPE_BIT_POS) | - (1 << ADC_CONTROL_INPUTSCALE_BIT_POS) | + (7 << ADC_CONTROL_INPUTSCALE_BIT_POS) | (((uint8_t)adc_pin) << ADC_CONTROL_MEAS_CH_BIT_POS)); /* Prescaler enabled; set to 7 */