예제 #1
0
uint8_t getOneByte(uint8_t address,uint8_t r)
{
  uint8_t ret;
  setRegisterAddress(address,r);

  doSTART();
  USIDR = (address<<1)+1;

  isr_USI_OVF_vect(); // CHECK ADDRESS

  if(USICR & (1<<USIOIE)){
    isr_USI_OVF_vect(); // SEND_DATA
  }

  ret = USIDR;

  if(USICR & (1<<USIOIE)){
    isr_USI_OVF_vect(); // REQUEST_REPLY_FROM_SEND_DATA
  }
  if(USICR & (1<<USIOIE)){
    isr_USI_OVF_vect(); // CHECK_REPLY_FROM_SEND_DATA
  }
  
  return ret;
}
예제 #2
0
void RegisterMemoryView::onRegisterChanged(const QString &name, quint64 value)
{
    if (name == m_registerName)
        setRegisterAddress(value);
}