aboutsummaryrefslogtreecommitdiff
path: root/driver_fw/serial.h
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-08-27 22:31:09 +0200
committerjaseg <git@jaseg.de>2023-08-27 22:31:09 +0200
commitec28fcd9f905358759eea98161f451567135d17e (patch)
treeed8f0f4f96811433ddca5f294f731c7584549a36 /driver_fw/serial.h
parent7c2cb09fad601facbb142d9378033d64d19b6488 (diff)
download8seg-ec28fcd9f905358759eea98161f451567135d17e.tar.gz
8seg-ec28fcd9f905358759eea98161f451567135d17e.tar.bz2
8seg-ec28fcd9f905358759eea98161f451567135d17e.zip
new driver blinkenlights
Diffstat (limited to 'driver_fw/serial.h')
-rw-r--r--driver_fw/serial.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/driver_fw/serial.h b/driver_fw/serial.h
deleted file mode 100644
index 8e2bf3d..0000000
--- a/driver_fw/serial.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Megumin LED display firmware
- * Copyright (C) 2018 Sebastian Götte <code@jaseg.net>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __SERIAL_H__
-#define __SERIAL_H__
-
-#include "global.h"
-
-/* High-level stuff */
-void serial_init(void);
-void send_status_reply(void);
-
-/* Internal low-level stuff */
-void tx_char(uint8_t c);
-void send_frame_formatted(uint8_t *buf, int len);
-volatile uint8_t *packet_received(int len);
-
-/* Error counters for debugging */
-extern unsigned int uart_overruns;
-extern unsigned int invalid_frames;
-
-union tx_buf_union {
- struct __attribute__((packed)) {
- uint8_t firmware_version,
- hardware_version,
- pad[2];
- uint32_t uptime_s,
- framerate_millifps,
- uart_overruns,
- invalid_frames;
- int16_t vin_mv,
- v3v3_mv,
- iload_ma,
- temp_celsius;
- uint8_t global_brightness;
- } desc_reply;
- uint8_t byte_data[0];
-};
-
-union rx_buf_union {
- struct __attribute__((packed)) { uint8_t fb[32]; uint8_t end[0]; } set_fb_rq;
- struct __attribute__((packed)) { uint8_t brightness; uint8_t end[0]; } set_global_brightness;
- uint8_t byte_data[0];
- uint32_t mac_data;
-};
-extern volatile union rx_buf_union rx_buf;
-
-#endif/*__SERIAL_H__*/