STM32F1xx micro-controller C firmware template
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.3 KiB

/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <>.
/* Copyright (c) 2016 King Kévin <> */
/* this library handles IrDA SIR (USART based) communication */
/* peripherals used: USART (check source for details) */
/* show the user how much received is available */
extern volatile uint8_t irda_received;
/* setup IrDA peripheral */
void irda_setup(void);
/* put character on IrDA (blocking) */
void irda_putchar_blocking(char c);
/* ensure all data has been transmitted (blocking) */
void irda_flush(void);
/* get character from IrDA (blocking) */
char irda_getchar(void);
/* put character on IrDA (non-blocking until buffer is full) */
void irda_putchar_nonblocking(char c);