Sylvain Munaut | bc9f5c4 | 2020-09-14 10:22:29 +0200 | [diff] [blame] | 1 | /* |
| 2 | * e1.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 | void e1_init(bool clk_mode); |
| 11 | void e1_poll(void); |
| 12 | void e1_debug_print(bool data); |
| 13 | |
| 14 | volatile uint8_t *e1_data_ptr(int mf, int frame, int ts); |
| 15 | unsigned int e1_data_ofs(int mf, int frame, int ts); |
Harald Welte | 5276567 | 2020-12-15 18:35:42 +0100 | [diff] [blame] | 16 | |
| 17 | enum e1_platform_led { |
| 18 | E1P_LED_GREEN = 0, |
| 19 | E1P_LED_YELLOW = 1, |
| 20 | }; |
| 21 | |
| 22 | enum e1_platform_led_state { |
| 23 | E1P_LED_ST_OFF = 0, |
| 24 | E1P_LED_ST_ON = 1, |
| 25 | E1P_LED_ST_BLINK = 2, |
| 26 | E1P_LED_ST_BLINK_FAST = 3 |
| 27 | }; |
| 28 | |
| 29 | /* external function provided by the platform; used by E1 driver to control LEDs */ |
| 30 | extern void e1_platform_led_set(uint8_t port, enum e1_platform_led led, |
| 31 | enum e1_platform_led_state state); |