打印
[其他ST产品]

stm32TFT彩屏显示问题,主函数代码如下

[复制链接]
247|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
麻花油条|  楼主 | 2023-12-20 11:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
主函数代码如下

int main(void)
{
  /*!< At this stage the microcontroller clock setting is already configured,
       this is done through SystemInit() function which is called from startup
       file (startup_STM32f10x_xx.s) before to branch to application main.
       To reconfigure the default setting of SystemInit() function, refer to
       system_stm32f10x.c file
     */     
  u16 i, len, c2len;
  u16 x;
  u16 y;
  u8 c[] = "www.armjishu.com";
  u8 c2[] = "TFT LCD 320X240";
  u8 *str;
  u16 charColor;
  u16 bkColor;
  
  len = sizeof(c)-1;
  c2len = sizeof(c2)-1;
  
  
  /* USARTx configured as follow:
        - BaudRate = 115200 baud  
        - Word Length = 8 Bits
        - One Stop Bit
        - No parity
        - Hardware flow control disabled (RTS and CTS signals)
        - Receive and transmit enabled
  */
  USART_InitStructure.USART_BaudRate = 115200;
  USART_InitStructure.USART_WordLength = USART_WordLength_8b;
  USART_InitStructure.USART_StopBits = USART_StopBits_1;
  USART_InitStructure.USART_Parity = USART_Parity_No;
  USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None;
  USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx;

  STM_EVAL_COMInit(COM1, &USART_InitStructure);

  /* Output a message on Hyperterminal using printf function */
  printf("nrUSART Printf Example: retarget the C library printf function to the USARTnr");
  printf("rnnn WWW.ARMJISHU.COM  %s configured....", EVAL_COM1_STR);
  printf("nr ############ WWW.ARMJISHU.COM! ############ ("__DATE__ " - " __TIME__ ")");

  printf("rn");
  printf("  _____ _______ __  __ ____ ___  ______ __  ___rn");
  printf(" / ____|__   __|  \/  |___ \__ \|  ____/_ |/ _ \rn");
  printf("| (___    | |  | \  / | __) | ) | |__   | | | | |_  __rn");
  printf(" \___ \   | |  | |\/| ||__ < / /|  __|  | | | | \ \/ /rn");

  printf(" ____) |  | |  | |  | |___) / /_| |     | | |_| |>   

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

279

主题

1458

帖子

2

粉丝