device/include/lib/pic16/libio/adc/adcopen.c: applied patch #
1364387
and fixed bug #
1364390
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4218
4a8a32a2-be11-0410-ad9d-
d568d2c75423
* src/pic16/gen.c (genCast): fixed bug with assignment of a pointer
to a char variable. Fixed bug #1504211
+ * device/include/pic16/adc.h,
+ device/include/lib/pic16/libio/adc/adcopen.c: applied patch #1364387
+ and fixed bug #1364390
2006-06-10 Borut Razem <borut.razem AT siol.net>
/* oscillator frequency */
#define ADC_FOSC_2 0x00
-#define ADC_FOSC_4 0x10
-#define ADC_FOSC_16 0x11
+#define ADC_FOSC_4 0x04
+#define ADC_FOSC_8 0x01
+#define ADC_FOSC_16 0x05
#define ADC_FOSC_32 0x02
-#define ADC_FOSC_64 0x12
-#define ADC_FOSC_RC 0x03
+#define ADC_FOSC_64 0x06
+#define ADC_FOSC_RC 0x07
/* channel selection */
/* setup reference and pins */
ADCON1 |= pcfg & 0x0f;
- ADCON0 |= (config & ADC_FRM_RJUST);
+ ADCON1 |= (config & ADC_FRM_RJUST);
if(config & ADC_INT_ON) {
PIR1bits.ADIF = 0;