Projekte
BirgerT
NIBO2 - Terminal mit UCOMIR2X
uart.h
Projekte
Forum
Doku
Öffentliche Projekte
Startseite
Beispielprogramme
Projekte von anderen
Welcome
Username
Passwort
Eingeloggt bleiben
Zugangsdaten vergessen?
Registrieren
Projektverwaltung
⇨ Please choose! ⇦
——————————————————
✎ Create new project...
★ Browse existing projects...
——————————————————
⚬ MotorTest#1
⚬ C Tutorial 8#1
⚬ NIBO2 C Project#1
⚙ C Tutorial 15#1
⚬ 2010_11_18_el_test001#1
NIBO2 - T... UCOMIR2X
main.c
niboprot.c
niboprot.h
niboprot_reg.h
uart.c
uart.h
Project details
Compiler settings
Nachrichten
Sie sind nicht eingeloggt.
Neuigkeiten
★
NiboRoboLib 3.6
2017-01-17: Neue Version 3.6
★
NiboRoboLib 3.4.1
2016-04-16: Neue Version 3.4.1
★
Coding Tutorial
2015-11-22: Jetzt auch für den NIBO burger!
Site-Statistic
7433 private projects
378 public projects
16180353 lines compiled
58212 builds
NIBO
@
nibo2_terminal_ucom/uart.h [read only]
/* BSD-License: Copyright (c) 2007 by Nils Springob, nicai-systems, Germany All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name nicai-systems nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*! @file uart0.h * @brief Routinen zur Kommunikation ��ber die serielle Schnittstelle * @author Nils Springob (nils@nicai-systems.de) * @date 2008-07-30 */ #ifndef NIBO_UART0_H_ #define NIBO_UART0_H_ //#if defined(NIBO_USE_UART0) || defined (DOXYGEN) #include <stdint.h> #ifdef __cplusplus extern "C" { #endif #define UART0_TXBUF_SIZE 32 #define UART0_RXBUF_SIZE 32 /*! * Setzt neue Baudrate */ void uart0_set_baudrate(uint16_t baud); /* private Variablen */ extern uint8_t uart0_txbuf[UART0_TXBUF_SIZE]; extern uint8_t uart0_rxbuf[UART0_RXBUF_SIZE]; extern volatile uint8_t uart0_txbuf_begin; extern volatile uint8_t uart0_txbuf_end; extern volatile uint8_t uart0_rxbuf_begin; extern volatile uint8_t uart0_rxbuf_end; /*! * Senden und empfangen aktivieren. */ void uart0_enable(); /*! * Senden und empfangen deaktivieren. */ void uart0_disable(); /*! * Gibt ein einzelnes Zeichen aus dem Empfangspuffer zur��ck. * Darf nur aufgerufen werden wenn (uart0_rxempty()==false) ist. */ char uart0_getchar(); /*! * Schreibt ein einzelnes Zeichen in den Sendepuffer. * Darf nur aufgerufen werden solange (uart0_txfull()==false) ist. */ char uart0_putchar(char c); /*! * Liefert true wenn der Empfangspuffer leer ist. */ static inline char uart0_rxempty() { return uart0_rxbuf_begin==uart0_rxbuf_end; } /*! * Liefert true wenn der Sendepuffer leer ist. */ static inline char uart0_txempty() { return uart0_txbuf_begin==uart0_txbuf_end; } /*! * Liefert true wenn der Empfangspuffer voll ist. */ static inline char uart0_rxfull() { return uart0_rxbuf_end==UART0_RXBUF_SIZE; } /*! * Liefert true wenn der Sendepuffer voll ist. */ static inline char uart0_txfull() { return uart0_txbuf_end==UART0_TXBUF_SIZE; } #ifdef __cplusplus } // extern "C" #endif //#endif // NIBO_USE_UART0 #endif // NIBO_UART0_H_
Compiler results:
Werbung
Online
agrohimlfj
alison98l50830707
amparogaertner105
arden98h034102828
Bogdanasf
corrinelawlor1782
danat53390066827
ktlnora421200715003
mpwrefugio83153968
veldawlh81514495
warrenhinder6456