Ignore:
Timestamp:
Apr 30, 2016, 11:29:25 PM (8 years ago)
Author:
ertl-honda
Message:

1.7.10のファイルに更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtos_arduino/trunk/arduino_lib/hardware/arduino/samd/cores/arduino/wiring_analog.c

    r175 r224  
    3131static int DAC_RESOLUTION = 10;
    3232
    33 // Wait for synchronization of registers between the clock domains
    34 static __inline__ void syncDAC() __attribute__((always_inline, unused));
    35 static void syncDAC() {
    36   while (DAC->STATUS.bit.SYNCBUSY == 1)
    37     ;
    38 }
    39 
    4033void analogReadResolution(int res) {
    4134        _readResolution = res;
    4235        while( ADC->STATUS.bit.SYNCBUSY == 1 )
    4336  {
    44     // Waiting for synchroinization
     37    // Waiting for synchronization
    4538  }
    4639        if(res == 8) ADC->CTRLB.bit.RESSEL= ADC_CTRLB_RESSEL_8BIT_Val;
     
    6962  while( ADC->STATUS.bit.SYNCBUSY == 1 )
    7063  {
    71     // Waiting for synchroinization
     64    // Waiting for synchronization
    7265  }
    7366  switch(ulMode)
     
    9184  while( ADC->STATUS.bit.SYNCBUSY == 1 )
    9285  {
    93     // Waiting for synchroinization
     86    // Waiting for synchronization
    9487  }
    9588}
     
    154147        DAC->DATA.reg = ulValue & 0x3FF;  // Dac on 10 bits.
    155148                DAC->CTRLA.bit.ENABLE = 1; // DAC Enabled
    156                 syncDAC();
     149                while (DAC->STATUS.bit.SYNCBUSY == 1); //wait for synchronization
    157150        return;
    158151    }
Note: See TracChangeset for help on using the changeset viewer.