46  uint16_t mmode = 0x422;  
 
   50  this->
write16_(ATM90E26_REGISTER_SOFTRESET, 0x789A);  
 
   51  this->
write16_(ATM90E26_REGISTER_FUNCEN,
 
   53  uint16_t read = this->
read16_(ATM90E26_REGISTER_LASTDATA);
 
   55    ESP_LOGW(TAG, 
"Could not initialize ATM90E26 IC, check SPI settings: %d", read);
 
   60  this->
write16_(ATM90E26_REGISTER_SAGTH, 0x17DD);  
 
   63  this->
write16_(ATM90E26_REGISTER_CALSTART, 0x5678);  
 
   66  this->
write16_(ATM90E26_REGISTER_MMODE, mmode);  
 
   73  this->
write16_(ATM90E26_REGISTER_LPHI, 0x0000);           
 
   74  this->
write16_(ATM90E26_REGISTER_NGAIN, 0x0000);          
 
   75  this->
write16_(ATM90E26_REGISTER_NPHI, 0x0000);           
 
   76  this->
write16_(ATM90E26_REGISTER_PSTARTTH, 0x08BD);       
 
   77  this->
write16_(ATM90E26_REGISTER_PNOLTH, 0x0000);         
 
   78  this->
write16_(ATM90E26_REGISTER_QSTARTTH, 0x0AEC);       
 
   79  this->
write16_(ATM90E26_REGISTER_QNOLTH, 0x0000);         
 
   92  this->
write16_(ATM90E26_REGISTER_CS1, cs);
 
   93  ESP_LOGVV(TAG, 
"Set CS1 to: 0x%04X", cs);
 
   96  this->
write16_(ATM90E26_REGISTER_ADJSTART, 0x5678);      
 
   99  this->
write16_(ATM90E26_REGISTER_IGAINN, 0x7530);        
 
  100  this->
write16_(ATM90E26_REGISTER_UOFFSET, 0x0000);       
 
  101  this->
write16_(ATM90E26_REGISTER_IOFFSETL, 0x0000);      
 
  102  this->
write16_(ATM90E26_REGISTER_IOFFSETN, 0x0000);      
 
  103  this->
write16_(ATM90E26_REGISTER_POFFSETL, 0x0000);      
 
  104  this->
write16_(ATM90E26_REGISTER_QOFFSETL, 0x0000);      
 
  105  this->
write16_(ATM90E26_REGISTER_POFFSETN, 0x0000);      
 
  106  this->
write16_(ATM90E26_REGISTER_QOFFSETN, 0x0000);      
 
  111  this->
write16_(ATM90E26_REGISTER_CS2, cs);
 
  112  ESP_LOGVV(TAG, 
"Set CS2 to: 0x%04X", cs);
 
  114  this->
write16_(ATM90E26_REGISTER_CALSTART,
 
  116  this->
write16_(ATM90E26_REGISTER_ADJSTART,
 
  119  const uint16_t sys_status = this->
read16_(ATM90E26_REGISTER_SYSSTATUS);
 
  120  if (sys_status & 0xC000) {  
 
  122    ESP_LOGW(TAG, 
"Could not initialize ATM90E26 IC: CS1 was incorrect, expected: 0x%04X",
 
  123             this->
read16_(ATM90E26_REGISTER_CS1));
 
  126  if (sys_status & 0x3000) {  
 
  127    ESP_LOGW(TAG, 
"Could not initialize ATM90E26 IC: CS2 was incorrect, expected: 0x%04X",
 
  128             this->
read16_(ATM90E26_REGISTER_CS2));