Beispiel #1
0
int32_t ILI9341_spi::DrawDot(int32_t xl, int32_t yt)
{
  Synch();
  arg0 = (xl << 16) | yt;
  cmd = CMD_DOT;
  return 0;
}
Beispiel #2
0
    bool InitStream(const wxString &url) {
        m_http.SetTimeout(30);      // 30 sec are much better rather than 10 min !!!
        m_pStream = m_http.GetInputStream(url);
        Synch();

        return (m_pStream != NULL);
    }
Beispiel #3
0
int32_t ILI9341_spi::SetColours(int32_t fore, int32_t back)
{
  Synch();
  arg0 = (back << 16) | (fore & 0xffff);
  cmd = CMD_SETCOLOURS;
  return 0;
}
Beispiel #4
0
int32_t ILI9341_spi::DrawRect(int32_t xl, int32_t yt, int32_t xr, int32_t yb)
{
  Synch();
  arg0 = (xl << 16) | yt;
  arg1 = (xr << 16) | yb;
  cmd = CMD_RECT;
  return 0;
}
Beispiel #5
0
int32_t ILI9341_spi::DrawStringSmall(int32_t xl, int32_t yt, int32_t str)
{
  Synch();
  arg0 = (xl << 16) | yt;
  arg1 = -str;
  cmd = CMD_STRING;
  return 0;
}
Beispiel #6
0
int32_t ILI9341_spi::DrawCharSmall(int32_t xl, int32_t yt, int32_t chr)
{
  Synch();
  arg0 = (xl << 16) | yt;
  arg1 = chr | 0x100;
  cmd = CMD_CHAR;
  return 0;
}
Beispiel #7
0
int32_t ILI9341_spi::DrawChar(int32_t xl, int32_t yt, int32_t chr)
{
  Synch();
  arg0 = (xl << 16) | yt;
  arg1 = chr & 0xff;
  cmd = CMD_CHAR;
  return 0;
}
Beispiel #8
0
int32_t ILI9341_spi::DrawLine(int32_t xl, int32_t yt, int32_t xr, int32_t yb)
{
  Synch();
  arg0 = (xl << 16) | yt;
  arg1 = (xr << 16) | yb;
  cmd = CMD_LINE;
  return 0;
}
Beispiel #9
0
    bool InitStream() {
        if (m_url.GetError() != wxURL_NOERR) {
            m_lasterror = wxSTREAM_READ_ERROR;
            wxLogDebug(wxT("wxURLInputStream - error with given URL..."));
            return FALSE;
        }

        wxLogDebug(wxT("wxURLInputStream - no URL parsing errors..."));

        m_url.GetProtocol().SetTimeout(30);         // 30 sec are much better rather than 10 min !!!
        wxLogDebug(wxT("wxURLInputStream - calling wxURL::GetInputStream"));
        m_pStream = m_url.GetInputStream();
        wxLogDebug(wxT("wxURLInputStream - call was successful"));
        Synch();

        return IsOk();
    }
Beispiel #10
0
int32_t ILI9341_spi::Start(int32_t nRES, int32_t nCS, int32_t RS, int32_t MOSI, int32_t SCLK)
{
  int32_t	mask;
  int32_t result = 0;
  Stop();
  cmd = CMD_SETUP;
  ((int32_t *)&dat[1484])[0] = 1 << nCS;
  ((int32_t *)&dat[1488])[0] = 1 << RS;
  ((int32_t *)&dat[1492])[0] = 1 << MOSI;
  ((int32_t *)&dat[1496])[0] = 1 << SCLK;
  ((int32_t *)&dat[1500])[0] = 1 << nRES;
  ((int32_t *)&dat[1504])[0] = ((*(int32_t *)&dat[1500]) | (*(int32_t *)&dat[1484])) | (*(int32_t *)&dat[1496]);
  arg0 = (int32_t)(&(*(int32_t *)&dat[0]));
  cog = 1 + cognew((int32_t)(&(*(int32_t *)&dat[156])), (int32_t)(&cmd));
  if (cog != 0) {
    Synch();
  }
  result = cog;
  return result;
}
Beispiel #11
0
/** Closes the stream buffer.

This function attempts to synchronise buffered data with the stream before 
freeing any resources. All errors are ignored.

@see MStreamBuf::Synch()
@see MStreamBuf::Release() */
EXPORT_C void MStreamBuf::Close()
	{
	Synch();
	Release();
	}
Beispiel #12
0
 wxFileOffset SeekI( wxFileOffset pos, wxSeekMode mode )
     { wxASSERT(m_pStream); wxFileOffset fo = m_pStream->SeekI(pos, mode);
         Synch(); return fo; }
Beispiel #13
0
 size_t OnSysRead(void *buffer, size_t bufsize)
     { wxASSERT(m_pStream); size_t ret = m_pStream->Read(buffer, bufsize).LastRead(); Synch(); return ret; }
Beispiel #14
0
int32_t ILI9341_spi::ClearScreen(void)
{
  Synch();
  cmd = CMD_CLEAR;
  return 0;
}