コード例 #1
0
ファイル: tft.c プロジェクト: siredmar/siredmar_projects
/*  \brief Sets register on TFT display controller
*
*  \param [in]  tft_register_ui16 = tft Controler register address
*  \param [in]  tft_registerValue_ui16 = Register value to write
*  \param [in]  tft_registerParameters_ui16 = Parameters count to write
*  \param [out] ---
*  \return      ---
*/
static void tft_setDisplayRegister
(
   uint16 tft_register_ui16,
   uint16 tft_registerValue_ui16,
   uint16 tft_registerParameters_ui16
)
{
   /* First send Command if it is != NOCMD */
   if(tft_register_ui16 != NOCMD)
   {
      tft_sendCommand(tft_register_ui16);
   }
   /* Then send or continue sending Parameter to tft controler if needed */
   if(tft_registerParameters_ui16 != NOPARAM)
   {
      tft_sendData(tft_registerValue_ui16);
   }
}
コード例 #2
0
static inline void graph(uint8_t y,uint8_t x,uint16_t col){
	y=y*15/32;
	tft_setXY(239-y,319-x);
	tft_sendData(col);
}