blob: c438cb9ca85a3d048995e0a05c04db1a953c3851 [file] [log] [blame]
Sylvain Munautbc9f5c42020-09-14 10:22:29 +02001/*
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
10void e1_init(bool clk_mode);
11void e1_poll(void);
12void e1_debug_print(bool data);
13
14volatile uint8_t *e1_data_ptr(int mf, int frame, int ts);
15unsigned int e1_data_ofs(int mf, int frame, int ts);
Harald Welte52765672020-12-15 18:35:42 +010016
17enum e1_platform_led {
18 E1P_LED_GREEN = 0,
19 E1P_LED_YELLOW = 1,
20};
21
22enum 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 */
30extern void e1_platform_led_set(uint8_t port, enum e1_platform_led led,
31 enum e1_platform_led_state state);