lib/Seeed_Arduino_AS5600/AS5600.cpp
/* mode = 0, output PWM, mode = 1 output analog (full range from 0% to 100% between GND and VDD */
mode = 0, output PWM, mode = 1 output analog (full range from 0% to 100% between GND and VDD
mode = 0 output PWM mode = 1 output analog ( full range from 0% to 100% between GND and VDD
void AMS_5600::setOutPut(uint8_t mode)
{
  uint8_t config_status;
  config_status = readOneByte(_conf_lo);
  if (mode == 1)
  {
    config_status = config_status & 0xcf;
  }
  else
  {
    uint8_t config_status;
    config_status = readOneByte(_conf_lo);
    if (mode == 1)
    {
      config_status = config_status & 0xcf;
    }
    else
    {
      config_status = config_status & 0xef;
    }
    writeOneByte(_conf_lo, lowByte(config_status));
  }
}
void AMS_5600 :: setOutPut ( uint8_t mode ) { uint8_t config_status ; config_status = readOneByte ( _conf_lo ) ; if ( mode == 1 ) { config_status = config_status & 0xcf ; } else { uint8_t config_status ; config_status = readOneByte ( _conf_lo ) ; if ( mode == 1 ) { config_status = config_status & 0xcf ; } else { config_status = config_status & 0xef ; } writeOneByte ( _conf_lo , lowByte ( config_status ) ) ; } }
mode = 0, output PWM, mode = 1 output analog (full range from 0% to 100% between GND and VDD
mode = 0 output PWM mode = 1 output analog ( full range from 0% to 100% between GND and VDD