bl_peripheral_interface.h
/*
* Copyright (c) 2013, Freescale Semiconductor, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* o Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* o 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.
*
* o Neither the name of Freescale Semiconductor, Inc. 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 HOLDER 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.
*/
#if !defined(__BL_PERIPHERAL_INTERFACE_H__)
#define __BL_PERIPHERAL_INTERFACE_H__
#include "bootloader/bl_context.h"
// Prototypes
typedef enum
{
kPeripheralClearClock = 0,
kPeripheralSetClock
} PeripheralClockSetting;
typedef enum
{
kPeripheralDisableIRQ = 0,
kPeripheralEnableIRQ
} PeripheralSystemIRQSetting;
// Externs
extern const peripheral_control_interface_t g_i2cControlInterface;
extern const peripheral_byte_inteface_t g_i2cByteInterface;
extern const peripheral_control_interface_t g_lpi2cControlInterface;
extern const peripheral_byte_inteface_t g_lpi2cByteInterface;
extern const peripheral_control_interface_t g_spiControlInterface;
extern const peripheral_byte_inteface_t g_spiByteInterface;
extern const peripheral_control_interface_t g_flexcanControlInterface;
extern const peripheral_byte_inteface_t g_flexcanByteInterface;
extern const peripheral_control_interface_t g_lpspiControlInterface;
extern const peripheral_byte_inteface_t g_lpspiByteInterface;
extern const peripheral_control_interface_t g_dspiControlInterface;
extern const peripheral_byte_inteface_t g_dspiByteInterface;
extern const peripheral_control_interface_t g_scuartControlInterface;
extern const peripheral_byte_inteface_t g_scuartByteInterface;
extern const peripheral_control_interface_t g_lpuartControlInterface;
extern const peripheral_byte_inteface_t g_lpuartByteInterface;
extern const peripheral_control_interface_t g_uartControlInterface;
extern const peripheral_byte_inteface_t g_uartByteInterface;
extern const peripheral_control_interface_t g_uart0ControlInterface;
extern const peripheral_byte_inteface_t g_uart0ByteInterface;
extern const peripheral_control_interface_t g_usbHidControlInterface;
extern const peripheral_packet_interface_t g_usbHidPacketInterface;
extern const peripheral_control_interface_t g_usbMsdControlInterface;
#endif // __BL_PERIPHERAL_INTERFACE_H__
// EOF
g_dspiControlInterface
const peripheral_control_interface_t g_dspiControlInterface
Control interface for the DSPI peripheral driver.
Definition: dspi_peripheral_interface.c:84
g_uart0ControlInterface
const peripheral_control_interface_t g_uart0ControlInterface
Control interface for the UART0 peripheral driver.
Definition: uart0_peripheral_interface.c:60
g_scuartControlInterface
const peripheral_control_interface_t g_scuartControlInterface
Control interface for the SCIUART peripheral driver.
Definition: scuart_peripheral_interface.c:63
g_i2cByteInterface
const peripheral_byte_inteface_t g_i2cByteInterface
Byte I/O interface for the I2C peripheral driver.
Definition: i2c_peripheral_interface.c:115
g_uartControlInterface
const peripheral_control_interface_t g_uartControlInterface
Control interface for the UART peripheral driver.
Definition: uart_peripheral_interface.c:65
g_spiControlInterface
const peripheral_control_interface_t g_spiControlInterface
Control interface for the SPI peripheral driver.
Definition: spi_peripheral_interface.c:83
g_lpspiControlInterface
const peripheral_control_interface_t g_lpspiControlInterface
Control interface for the LPSPI peripheral driver.
Definition: lpspi_peripheral_interface.c:84
g_usbHidControlInterface
const peripheral_control_interface_t g_usbHidControlInterface
Control interface for the USB HID peripheral driver.
Definition: usb_hid_msc_peripheral_interface.c:105
PeripheralSystemIRQSetting
PeripheralSystemIRQSetting
IRQ options.
Definition: bl_peripheral_interface.h:50
g_spiByteInterface
const peripheral_byte_inteface_t g_spiByteInterface
Byte I/O interface for the SPI peripheral driver.
Definition: spi_peripheral_interface.c:90
peripheral_control_interface_t
Peripheral control interface.
Definition: bl_peripheral.h:75
PeripheralClockSetting
PeripheralClockSetting
Clock options.
Definition: bl_peripheral_interface.h:43
g_usbMsdControlInterface
const peripheral_control_interface_t g_usbMsdControlInterface
Control interface for the USB MSD peripheral driver.
g_lpi2cByteInterface
const peripheral_byte_inteface_t g_lpi2cByteInterface
Byte I/O interface for the LPI2C peripheral driver.
Definition: lpi2c_peripheral_interface.c:107
peripheral_packet_interface_t
Peripheral Packet Interface.
Definition: bl_peripheral.h:101
g_uartByteInterface
const peripheral_byte_inteface_t g_uartByteInterface
Byte I/O interface for the UART peripheral driver.
Definition: uart_peripheral_interface.c:69
g_flexcanControlInterface
const peripheral_control_interface_t g_flexcanControlInterface
Control interface for the FLEXCAN peripheral driver.
Definition: flexcan_peripheral_interface.c:266
peripheral_byte_inteface_t
Peripheral abstract byte interface.
Definition: bl_peripheral.h:84
g_lpi2cControlInterface
const peripheral_control_interface_t g_lpi2cControlInterface
Control interface for the LPI2C peripheral driver.
Definition: lpi2c_peripheral_interface.c:103
g_dspiByteInterface
const peripheral_byte_inteface_t g_dspiByteInterface
Byte I/O interface for the DSPI peripheral driver.
Definition: dspi_peripheral_interface.c:91
g_usbHidPacketInterface
const peripheral_packet_interface_t g_usbHidPacketInterface
Packet interface for the USB HID peripheral driver.
Definition: usb_hid_msc_peripheral_interface.c:110
g_uart0ByteInterface
const peripheral_byte_inteface_t g_uart0ByteInterface
Byte I/O interface for the UART0 peripheral driver.
Definition: uart0_peripheral_interface.c:64
g_lpuartByteInterface
const peripheral_byte_inteface_t g_lpuartByteInterface
Byte I/O interface for the LPUART peripheral driver.
Definition: lpuart_peripheral_interface.c:67
g_lpspiByteInterface
const peripheral_byte_inteface_t g_lpspiByteInterface
Byte I/O interface for the LPSPI peripheral driver.
Definition: lpspi_peripheral_interface.c:88
g_i2cControlInterface
const peripheral_control_interface_t g_i2cControlInterface
Control interface for the I2C peripheral driver.
Definition: i2c_peripheral_interface.c:108
g_flexcanByteInterface
const peripheral_byte_inteface_t g_flexcanByteInterface
Byte I/O interface for the FLEXCAN peripheral driver.
Definition: flexcan_peripheral_interface.c:274
g_lpuartControlInterface
const peripheral_control_interface_t g_lpuartControlInterface
Control interface for the LPUART peripheral driver.
Definition: lpuart_peripheral_interface.c:63
g_scuartByteInterface
const peripheral_byte_inteface_t g_scuartByteInterface
Byte I/O interface for the SCIUART peripheral driver.
Definition: scuart_peripheral_interface.c:67