We're no longer updating This wiki!!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:xu3_hardware_adc [2016/01/22 10:12]
john1117 [Using mmap]
en:xu3_hardware_adc [2016/12/19 16:03]
charles.park [Using mmap]
Line 21: Line 21:
 ===== Using mmap ===== ===== Using mmap =====
  
-Example ​source code+Example ​source code to access the ADC.
 <file c mmap_adc.c>​ <file c mmap_adc.c>​
 #include <​stdio.h>​ #include <​stdio.h>​
Line 28: Line 28:
 #include <​stdint.h>​ #include <​stdint.h>​
    
-/* EXYNOS4412/​5250 ​ADC_V1 registers definitions */+/* EXYNOS ​ADC_V1 registers definitions */
 #define ADC_V1_DATAX 0x0C #define ADC_V1_DATAX 0x0C
    
Line 84: Line 84:
  {  {
  // End of A/D conversion  // End of A/D conversion
- if (*(adc + (ADC_V2_STAT >> 2)) && 4) {+ if (*(adc + (ADC_V2_STAT >> 2)) & 4) {
  /* Read value */  /* Read value */
  if (channel == 0x0) {  if (channel == 0x0) {
en/xu3_hardware_adc.txt ยท Last modified: 2016/12/19 16:03 by charles.park
CC Attribution-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0