RTEMS 5.2
sc16is752.h
1/*
2 * Copyright (c) 2016 embedded brains GmbH. All rights reserved.
3 *
4 * embedded brains GmbH
5 * Dornierstr. 4
6 * 82178 Puchheim
7 * Germany
8 * <info@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#ifndef LIBBSP_ARM_ATSAM_SC16IS752_H
16#define LIBBSP_ARM_ATSAM_SC16IS752_H
17
18#include <rtems/irq-extension.h>
19#include <libchip/chip.h>
20
21#include <dev/serial/sc16is752.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif /* __cplusplus */
26
32typedef struct {
34 Pin irq_pin;
37 uint32_t irqs_index;
39
45typedef struct {
49 const char *device_path;
50
54 sc16is752_mode mode;
55
61
65 const char *spi_path;
66
72
76 uint32_t spi_speed_hz;
77
82 const Pin irq_pin;
83
88 uint32_t server_index;
90
103int atsam_sc16is752_spi_create(
106);
107
108#ifdef __cplusplus
109}
110#endif /* __cplusplus */
111
112#endif /* LIBBSP_ARM_ATSAM_SC16IS752_H */
Header file for the Interrupt Manager Extension.
Definition: pio.h:172
The SC16IS752 device configuration.
Definition: sc16is752.h:45
uint32_t spi_speed_hz
The SPI bus speed in Hertz.
Definition: sc16is752.h:76
const char * spi_path
The SPI bus device path.
Definition: sc16is752.h:65
uint32_t input_frequency
The input frequency in Hertz of the SC16IS752 chip. See XTAL1 and XTAL2 pins.
Definition: sc16is752.h:60
sc16is752_mode mode
The SC16IS752 mode.
Definition: sc16is752.h:54
uint32_t server_index
The index to identify the interrupt server used for interrupt processing.
Definition: sc16is752.h:88
uint8_t spi_chip_select
The SPI chip select (starts with 0, the SPI driver uses SPI_ChipSelect(1 << spi_chip_select)).
Definition: sc16is752.h:71
const char * device_path
The device file path for the new device.
Definition: sc16is752.h:49
const Pin irq_pin
The interrupt pin, e.g. { PIO_PD28, PIOD, ID_PIOD, PIO_INPUT, PIO_IT_LOW_LEVEL }.
Definition: sc16is752.h:82
The SC16IS752 device context.
Definition: sc16is752.h:32
Definition: deflate.c:115
An interrupt server action.
Definition: irq-extension.h:245
An interrupt server entry.
Definition: irq-extension.h:337
SC16IS752 SPI context.
Definition: sc16is752.h:181