/* 
 * File:   ldr.h
 * Author: User
 *
 * Created on 19 October 2015, 3:13 PM
 */

#ifndef LDR_H
#define	LDR_H

#ifdef	__cplusplus
extern "C" {
#endif

extern volatile unsigned char ADCResultsUpdated;

__attribute__((mips16)) void setup_ADC();
__attribute__((mips16)) void teardown_ADC();
__attribute__((mips16)) int get_LDR_val(); // return value 0-1023
__attribute__((mips16)) int get_supply_voltage(); // return value in millivolts

#ifdef	__cplusplus
}
#endif

#endif	/* LDR_H */

