Sylvain Munaut | bc9f5c4 | 2020-09-14 10:22:29 +0200 | [diff] [blame] | 1 | /* |
| 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 | |
| 13 | enum pdm_chan { |
| 14 | PDM_CLK_LO = 0, |
| 15 | PDM_CLK_HI = 1, |
Sylvain Munaut | 5e86047 | 2020-09-15 22:20:21 +0200 | [diff] [blame] | 16 | |
| 17 | /* icE1usb */ |
| 18 | PDM_E1_RX0 = 2, |
| 19 | PDM_E1_RX1 = 3, |
| 20 | |
| 21 | /* icE1usb-proto */ |
Sylvain Munaut | bc9f5c4 | 2020-09-14 10:22:29 +0200 | [diff] [blame] | 22 | PDM_E1_N = 2, |
| 23 | PDM_E1_P = 3, |
| 24 | PDM_E1_CT = 4, |
| 25 | }; |
| 26 | |
| 27 | void pdm_set(int chan, bool enable, unsigned value, bool normalize); |
| 28 | |
Sylvain Munaut | 5e86047 | 2020-09-15 22:20:21 +0200 | [diff] [blame] | 29 | void e1_led_set(bool enable, uint8_t cfg); |
Sylvain Munaut | bc9f5c4 | 2020-09-14 10:22:29 +0200 | [diff] [blame] | 30 | uint16_t e1_tick_read(void); |
Sylvain Munaut | 46d6b41 | 2020-10-29 13:19:05 +0100 | [diff] [blame] | 31 | |
| 32 | void reboot(int fw); |