Projekte
BirgerT
NIBObee - Terminal_bt
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
NIBObee -...rminal_bt
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
@
nibobee_terminal_bt/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
andreasnew290004031
armanddelatorre8855
blythe489719956356
bvkdarrel629626
caridadculbertson5
carinstultz4050
carollamson4653652
cassienajera030
catherinemccaffrey57
chandradillion322729
christell796644475029
clemmielcg304935418
courtneymccafferty56
dakota08q0805102416
deborabarksdale798
edisonlizotte4427
effiebailey1301319
elbawymark1984175
elberttelfer568
elisabroadus2257
ellismclane316891531
elvialavender09
emersonweir268525
felicacooper9236
fgvilana9831165538
floygorman01636663
giaburroughs46893
gusheinig5006813136
horacebatiste02630
jamilamcgarry907281
janellegard4477
janetitg188521920
jeffryaiello27385282
jenscorbo083215402
jorgesteiner63401957
kendrazeigler82
kerstinmcginnis
kristeenchaves915
KylieSat
latoyasorenson155
lee72827156077981
leliabaughan2211
lenardamiet3598464
lidamascorro550
loriniles410565581
loviematthies002
luciehateley133886
margarita650153701567
margretpettey50697721
maribeleverard3
Marinavuc
melisacastiglia060
moshegether2103369
nellcarrol80211569607
nganbolton343216575
odettesear36035
patricetooth96162311
reneedillon5507
rolandokilgour324331
rongair39316288
roxiewessel0625174
seymourlerner905090
shaneldisher04604335
shantaebice4945737509
silkemerrett05515
tammarareddy0660
tiffaniscott025
torriarscott25066
veldawlh81514495
warren38l1013290
warrenhinder6456
williepinkston9240
wolfgangmistry518270