no-OS
Loading...
Searching...
No Matches
aducm3029_uart.c File Reference

Implementation of UART driver for ADuCM302x. More...

#include <stdlib.h>
#include "no_os_uart.h"
#include "aducm3029_uart.h"
#include "aducm3029_irq.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
#include <drivers/uart/adi_uart.h>
Include dependency graph for aducm3029_uart.c:

Macros

#define NO_OS_CLK_FREQ   26000000u
 
#define NO_OS_BAUDS_NB   10u
 
#define NO_OS_NUM_UART_DEVICES   1
 

Functions

void uart_rx_callback (void *context)
 

Variables

const struct no_os_baud_desc baud_rates_26MHz [NO_OS_BAUDS_NB]
 
const struct no_os_uart_platform_ops aducm_uart_ops
 aducm3029 platform specific UART platform ops structure
 

Detailed Description

Implementation of UART driver for ADuCM302x.

Author
Mihail Chindris (mihai.nosp@m.l.ch.nosp@m.indri.nosp@m.s@an.nosp@m.alog..nosp@m.com)

Copyright 2019(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ NO_OS_BAUDS_NB

#define NO_OS_BAUDS_NB   10u

◆ NO_OS_CLK_FREQ

#define NO_OS_CLK_FREQ   26000000u

◆ NO_OS_NUM_UART_DEVICES

#define NO_OS_NUM_UART_DEVICES   1

In ADuCM302x UART0 is available

Function Documentation

◆ uart_rx_callback()

void uart_rx_callback ( void * context)

Variable Documentation

◆ aducm_uart_ops

const struct no_os_uart_platform_ops aducm_uart_ops
Initial value:
= {
.init = &aducm3029_uart_init,
.read = &aducm3029_uart_read,
.write = &aducm3029_uart_write,
.read_nonblocking = &aducm3029_uart_read_nonblocking,
.write_nonblocking = &aducm3029_uart_write_nonblocking,
.get_errors = &aducm3029_uart_get_errors,
.remove = &aducm3029_uart_remove
}

aducm3029 platform specific UART platform ops structure

◆ baud_rates_26MHz

const struct no_os_baud_desc baud_rates_26MHz[NO_OS_BAUDS_NB]
Initial value:
= {
{9600, 1078, 3, 24, 3},
{19200, 1078, 3, 12, 3},
{38400, 1321, 3, 8, 2},
{57600, 1078, 3, 4, 3},
{115200, 1563, 1, 4, 3},
{230400, 1563, 1, 2, 3},
{460800, 1563, 1, 1, 3},
{921600, 1563, 1, 1, 2},
{1000000, 1280, 1, 1, 2},
{1500000, 171, 1, 1, 2}
}

Stores calculated baud rates and parameters