⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sw_uart.h

📁 PIC18F452 PWM程序,CCP1 CCP2模拟程序
💻 H
字号:
#ifndef __SW_UART_H
#define __SW_UART_H

/* PIC 18 Software UART library header
 *
 * The I/O pins must be specified for the software UART. The
 * corresponding TRIS bits must also be specified. The notation is:
 *     PORTx,y  where x is A,B,C etc. and y is the bit 0-7
 *     TRISx,y  where x is A,B,C etc. and y is the bit 0-7
 * This is in assembly language notation because assembly is
 * used to initialize the software UART.
 */

/* Function Prototypes */

#define PARAM_SCLASS auto

/* OpenUART
 * Configures the UART I/O pins
 */
void OpenUART(void);

/* ReadUART
 * Reads a byte from the UART
 */
char ReadUART(void);

/* WriteUART
 * Writes a byte to the UART
 */
void WriteUART(PARAM_SCLASS char);

/* getsUART
 * Reads a string from UART
 */
void getsUART(PARAM_SCLASS char *, PARAM_SCLASS unsigned char);

/* putsUART
 * Writes a string to the UART
 */
void putsUART(PARAM_SCLASS char *);

/* getcUART
 * getc is really read
 */
#define getcUART ReadUART

/* putcUART
 * putc is really write
 */
#define putcUART WriteUART

#endif /* __SW_UART_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -