blob: 6d9036476566745e27bc81cae735eaf1199a992c [file] [log] [blame]
Sylvain Munautbc9f5c42020-09-14 10:22:29 +02001/*
2 * misc.h
3 *
4 * Copyright (C) 2019-2020 Sylvain Munaut <tnt@246tNt.com>
5 * SPDX-License-Identifier: GPL-3.0-or-later
6 */
7
8#pragma once
9
10#include <stdbool.h>
11#include <stdint.h>
12
13enum pdm_chan {
14 PDM_CLK_LO = 0,
15 PDM_CLK_HI = 1,
Sylvain Munaut5e860472020-09-15 22:20:21 +020016
17 /* icE1usb */
18 PDM_E1_RX0 = 2,
19 PDM_E1_RX1 = 3,
20
21 /* icE1usb-proto */
Sylvain Munautbc9f5c42020-09-14 10:22:29 +020022 PDM_E1_N = 2,
23 PDM_E1_P = 3,
24 PDM_E1_CT = 4,
25};
26
27void pdm_set(int chan, bool enable, unsigned value, bool normalize);
28
Sylvain Munaut5e860472020-09-15 22:20:21 +020029void e1_led_set(bool enable, uint8_t cfg);
Sylvain Munautbc9f5c42020-09-14 10:22:29 +020030uint16_t e1_tick_read(void);