コード例 #1
0
ファイル: ILI9341-spi.cpp プロジェクト: UtahDave/OpenWest2015
int32_t ILI9341_spi::Synch(void)
{
  while (!(cmd == 0)) {
    Yield__();
  }
  return 0;
}
コード例 #2
0
int32_t ircom_tx(int32_t c)
{
  // Move c into transmit buffer if room is available
  // -- will wait if buffer is full
  while (!(irself->txtail != ((irself->txhead + 1) & BUF_MASK))) {
    Yield__();
  }
  irself->txbuf[irself->txhead] = c;
  irself->txhead = (++irself->txhead) & BUF_MASK;
  return 0;
}
コード例 #3
0
int32_t ircom_rxtime(int32_t mslim)
{
    int32_t	t, c;
    // Wait ms milliseconds for a byte to be received
    // -- returns -1 if no byte received, $00..$FF if byte
    t = CNT;
    while (!(((c = ircom_rxcheck()) >= 0) || (((CNT - t) / (CLKFREQ / 1000)) > mslim))) {
        Yield__();
    }
    //print("%d", c);
    return c;
}
コード例 #4
0
int32_t screen_setcommand(int32_t cmd, int32_t argptr)
{
  // Write command and pointer
  
//  while(lockset(screenLock));
  self->command = (cmd << 16) + argptr;
  while (self->command) 
  {
    Yield__();
  }
//  lockclr(screenLock);
  return 0;
}
コード例 #5
0
ファイル: test29.cpp プロジェクト: neutered/propgcc
int32_t test29::Str(int32_t Stringptr)
{
  while (lockset(Strlock)) {
    Yield__();
  }
  {
    int32_t _idx__0000;
    int32_t _limit__0001 = strlen((char *) Stringptr);
    for(_idx__0000 = 1; _idx__0000 <= _limit__0001; (_idx__0000 = (_idx__0000 + 1))) {
      Tx(((uint8_t *)(Stringptr++))[0]);
    }
  }
  lockclr(Strlock);
  return 0;
}