Skip to content

Commit e640f5f

Browse files
Re-do change for changing ADC range from 0 to 3.3V
1 parent c06fa3a commit e640f5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_ONSEMI/TARGET_NCS36510/analogin_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ void analogin_init(analogin_t *obj, PinName pin)
8888
/* Single sample, absolute conversion, scale = 1 */
8989
obj->adcReg->CONTROL.WORD = ((0 << ADC_CONTROL_MODE_BIT_POS) |
9090
(1 << ADC_CONTROL_MEASTYPE_BIT_POS) |
91-
(1 << ADC_CONTROL_INPUTSCALE_BIT_POS) |
91+
(6 << ADC_CONTROL_INPUTSCALE_BIT_POS) |
9292
(((uint8_t)adc_pin) << ADC_CONTROL_MEAS_CH_BIT_POS));
9393

9494
/* Prescaler enabled; set to 7 */

0 commit comments

Comments
 (0)