Page 835 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 835
#ifndef __USART_H
#define __USART_H
extern void USART1_SendByte(u16 dat);
extern void USART1Write(u8* data,u16 len);
void USART1_SendBit(unsigned char Data);
void USART1_Configuration(void);
void USART2_Configuration(void);
void USART1_IRQHandler(void);
void USART2_IRQHandler(void);
extern void USART2_SendByte(u16 dat);
extern void USART2Write(u8* data,u16 len);
uint16_t USART1_ReceiveData(void);
uint16_t USART2_ReceiveData(void);
extern u16 k; //전역변수 k, main.c와 usart.c에서 함께 사용하기 위해 선언
#define DIR485_H GPIOC->BSRR=1<<1
#define DIR485_L GPIOC->BRR=1<<1
#endif
4) GLCD.c
LCD관련 함수들이 모두 모여 있는 프로그램이다. 사용자는 이 프로그램에서 작성된 함수를
사용해 간단하게 LCD를 제어할 수 있다. 단, main.c에서 GLCD.h파일을 include하고 있어야
한다.
#pragma diag_suppress=550
#include "stm32f10x.h"
#include "GLCD.h"
#include "font.h"
/* SPI_SR - bit definitions. */
#define RXNE 0x01
#define TXE 0x02
#define BSY 0x80
- 828 -