KETCube
Data Structures | Macros | Typedefs | Enumerations | Functions
ketCube_uart.h File Reference

This file contains definitions for the UART manager. More...

#include "ketCube_cfg.h"
#include "ketCube_gpio.h"

Go to the source code of this file.

Data Structures

struct  ketCube_UART_descriptor_t
 UART descriptor structure. More...
 

Macros

#define KETCUBE_UART_NAME   "uart_drv"
 UART driver name. More...
 

Typedefs

typedef void(* ketCube_UART_SimpleCbFn_t) (void)
 

Enumerations

enum  ketCube_UART_ChannelNo_t {
  KETCUBE_UART_CHANNEL_1 = 0, KETCUBE_UART_CHANNEL_2 = 1, KETCUBE_UART_CHANNEL_3 = 2, KETCUBE_UART_CHANNEL_4 = 3,
  KETCUBE_UART_CHANNEL_5 = 4, KETCUBE_UART_CHANNEL_COUNT
}
 UART supported channels. More...
 

Functions

ketCube_cfg_DrvError_t ketCube_UART_RegisterHandle (ketCube_UART_ChannelNo_t channel, ketCube_UART_descriptor_t *descriptor)
 Register UART channel for exclusive access. More...
 
ketCube_cfg_DrvError_t ketCube_UART_UnRegisterHandle (ketCube_UART_ChannelNo_t channel)
 Unregister UART channel. More...
 
ketCube_cfg_DrvError_t ketCube_UART_SetupPin (ketCube_gpio_port_t port, ketCube_gpio_pin_t pin, uint8_t af)
 Setup UART PIN(s) More...
 
UART_HandleTypeDef * ketCube_UART_GetHandle (ketCube_UART_ChannelNo_t channel)
 Retrieve UART handle for given channel. More...
 
void ketCube_UART_IRQCallback (ketCube_UART_ChannelNo_t channel)
 
void ketCube_UART_ReceiveCallback (ketCube_UART_ChannelNo_t channel)
 
void ketCube_UART_TransmitCallback (ketCube_UART_ChannelNo_t channel)
 
void ketCube_UART_ErrorCallback (ketCube_UART_ChannelNo_t channel)
 
void ketCube_UART_WakeupCallback (ketCube_UART_ChannelNo_t channel)
 
void ketCube_UART_IoInitCallback (ketCube_UART_ChannelNo_t channel)
 
void ketCube_UART_IoDeInitCallback (ketCube_UART_ChannelNo_t channel)
 
void ketCube_UART_IoInitAll (void)
 Initialize all registered descriptors (e.g. when going back from sleep) More...
 
void ketCube_UART_IoDeInitAll (void)
 Denitialize all registered descriptors (e.g. when going to sleep) More...
 
void ketCube_UART_EnableAll (void)
 Enable All Registered UART Instances. More...
 
void ketCube_UART_DisableAll (void)
 Disable All UART Instances. More...
 

Detailed Description

This file contains definitions for the UART manager.

Author
Martin Ubl
Version
0.1
Date
2018-03-07
Attention

© Copyright (c) 2018 University of West Bohemia in Pilsen All rights reserved.

Developed by: The SmartCampus Team Department of Technologies and Measurement www.smartcampus.cz | www.zcu.cz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.