Loading...
Searching...
No Matches
dac_dds_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Beuth Hochschule für Technik Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
20
21#include "board.h"
22#include "macros/units.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#ifndef DAC_DDS_PARAM_DAC
33#define DAC_DDS_PARAM_DAC DAC_LINE(0)
34#endif
35#ifndef DAC_DDS_PARAM_TIMER
36#define DAC_DDS_PARAM_TIMER (TIMER_NUMOF - 1)
37#endif
38#ifndef DAC_DDS_PARAM_TIMER_HZ
39#define DAC_DDS_PARAM_TIMER_HZ MHZ(1)
40#endif
41
42#ifndef DAC_DDS_PARAMS
43#define DAC_DDS_PARAMS { .dac = DAC_DDS_PARAM_DAC, \
44 .timer = DAC_DDS_PARAM_TIMER, \
45 .timer_hz = DAC_DDS_PARAM_TIMER_HZ, \
46 }
47#endif
49
54{
55 DAC_DDS_PARAMS
56};
57
61#define DAC_DDS_NUMOF ARRAY_SIZE(dac_dds_params)
62
63#ifdef __cplusplus
64}
65#endif
66
static const dac_dds_params_t dac_dds_params[]
DAC DDS configuration.
Configuration struct for a DAC DDS channel.
Definition dac_dds.h:66
Unit helper macros.