comparison src/adc_lightsensor.asm @ 236:e2ea74646127

configure hardware_flag byte
author heinrichsweikamp
date Wed, 25 Feb 2015 22:19:30 +0100
parents 23311219dacc
children e1cd6848863d
comparison
equal deleted inserted replaced
235:23311219dacc 236:e2ea74646127
232 global get_ambient_level 232 global get_ambient_level
233 get_ambient_level: ; starts ADC and waits until finished 233 get_ambient_level: ; starts ADC and waits until finished
234 btfsc adc_running ; ADC in use? 234 btfsc adc_running ; ADC in use?
235 return ; Yes, return 235 return ; Yes, return
236 236
237 btfss rechargeable 237 btfsc ambient_sensor
238 bra get_ambient_level1 ; Normal ostc3 hardware 238 bra get_ambient_level1 ; Normal ostc3 hardware
239 239
240 banksel isr_backup ; Back to Bank0 ISR data 240 banksel isr_backup ; Back to Bank0 ISR data
241 movff opt_brightness,isr1_temp 241 movff opt_brightness,isr1_temp
242 incf isr1_temp,F ; adjust 0-2 to 1-3 242 incf isr1_temp,F ; adjust 0-2 to 1-3