Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
sb_globals.h
00001 /* 00002 Copyright (c) 2010 Andy Kirkham 00003 00004 Permission is hereby granted, free of charge, to any person obtaining a copy 00005 of this software and associated documentation files (the "Software"), to deal 00006 in the Software without restriction, including without limitation the rights 00007 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00008 copies of the Software, and to permit persons to whom the Software is 00009 furnished to do so, subject to the following conditions: 00010 00011 The above copyright notice and this permission notice shall be included in 00012 all copies or substantial portions of the Software. 00013 00014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00017 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00018 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00019 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 00020 THE SOFTWARE. 00021 */ 00022 00023 #ifndef SB_GLOBALS_G 00024 #define SB_GLOBALS_G 00025 00026 #define SERIALBUFFERED_BUFFER_SIZE 256 00027 00028 #define SET_REGISTER(reg, val) *(uint32_t *)(uart_base+reg)=val 00029 #define GET_REGISTER(reg) *(uint32_t *)(uart_base+reg) 00030 00031 #define SERIALBUFFERED_RBR 0x00 00032 #define SERIALBUFFERED_THR 0x00 00033 #define SERIALBUFFERED_DLL 0x00 00034 #define SERIALBUFFERED_IER 0x04 00035 #define SERIALBUFFERED_DML 0x04 00036 #define SERIALBUFFERED_IIR 0x08 00037 #define SERIALBUFFERED_FCR 0x08 00038 #define SERIALBUFFERED_LCR 0x0C 00039 #define SERIALBUFFERED_LSR 0x14 00040 #define SERIALBUFFERED_SCR 0x1C 00041 #define SERIALBUFFERED_ACR 0x20 00042 #define SERIALBUFFERED_ICR 0x24 00043 #define SERIALBUFFERED_FDR 0x28 00044 #define SERIALBUFFERED_TER 0x30 00045 00046 extern char *_tx_buffer[4]; 00047 extern int _tx_buffer_size[4]; 00048 extern int _tx_buffer_in[4]; 00049 extern int _tx_buffer_out[4]; 00050 extern bool _tx_buffer_full[4]; 00051 extern bool _tx_buffer_overflow[4]; 00052 extern bool _tx_buffer_used_malloc[4]; 00053 00054 extern char *_rx_buffer[4]; 00055 extern int _rx_buffer_size[4]; 00056 extern int _rx_buffer_in[4]; 00057 extern int _rx_buffer_out[4]; 00058 extern bool _rx_buffer_full[4]; 00059 extern bool _rx_buffer_overflow[4]; 00060 extern bool _rx_buffer_used_malloc[4]; 00061 00062 #endif
Generated on Wed Jul 13 2022 01:50:20 by
1.7.2