openMMC
Open Source Modular MMC for AMCs
Loading...
Searching...
No Matches
idt_8v54816.h
Go to the documentation of this file.
1/*
2 * openMMC -- Open Source modular IPM Controller firmware
3 *
4 * Copyright (C) 2021 Krzysztof Macias <krzysztof.macias@creotech.pl>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
20 */
21
22#ifndef IDT_8V54816_H_
23#define IDT_8V54816_H_
24
25#include "port.h"
26
27#define IDT_MASK_SRC 0xF
28#define IDT_MASK_POL 1<<5
29#define IDT_MASK_TERM 1<<6
30#define IDT_MASK_DIR 1<<7
31
32#define IDT_POL_N 0
33#define IDT_POL_P 1<<5
34
35#define IDT_TERM_OFF 0
36#define IDT_TERM_ON 1<<6
37
38#define IDT_DIR_IN 0
39#define IDT_DIR_OUT 1<<7
40
41
60
61uint8_t clock_switch_read_reg(uint8_t *rx_data);
62uint8_t clock_switch_write_reg(uint8_t *tx_data);
63uint8_t clock_switch_set_single_channel(uint8_t channel, uint8_t value);
64uint8_t clock_switch_read_single_channel(uint8_t channel, uint8_t *data);
66
67#endif
uint8_t clock_switch_default_config()
uint8_t clock_switch_read_reg(uint8_t *rx_data)
Definition idt_8v54816.c:31
IDT_CLK_SRC
Definition idt_8v54816.h:42
@ IDT_SRC_CH6
Definition idt_8v54816.h:49
@ IDT_SRC_CH1
Definition idt_8v54816.h:44
@ IDT_SRC_CH2
Definition idt_8v54816.h:45
@ IDT_SRC_CH4
Definition idt_8v54816.h:47
@ IDT_SRC_CH13
Definition idt_8v54816.h:56
@ IDT_SRC_CH11
Definition idt_8v54816.h:54
@ IDT_SRC_CH14
Definition idt_8v54816.h:57
@ IDT_SRC_CH12
Definition idt_8v54816.h:55
@ IDT_SRC_CH0
Definition idt_8v54816.h:43
@ IDT_SRC_CH8
Definition idt_8v54816.h:51
@ IDT_SRC_CH9
Definition idt_8v54816.h:52
@ IDT_SRC_CH3
Definition idt_8v54816.h:46
@ IDT_SRC_CH5
Definition idt_8v54816.h:48
@ IDT_SRC_CH15
Definition idt_8v54816.h:58
@ IDT_SRC_CH10
Definition idt_8v54816.h:53
@ IDT_SRC_CH7
Definition idt_8v54816.h:50
uint8_t clock_switch_write_reg(uint8_t *tx_data)
Definition idt_8v54816.c:44
uint8_t clock_switch_read_single_channel(uint8_t channel, uint8_t *data)
Definition idt_8v54816.c:65
uint8_t clock_switch_set_single_channel(uint8_t channel, uint8_t value)
Definition idt_8v54816.c:55
Port layer (includes all portable functions headers)