diff options
author | jaseg <git@jaseg.net> | 2018-07-17 15:43:26 +0200 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2018-07-17 15:43:26 +0200 |
commit | 6df66b77ba5b27bce5630694742f2dac57b8d3eb (patch) | |
tree | fc14370fdea41b6d7a672758aa89886b9107f78c /tests/usb-serial-rs485/usb_cdcacm.h | |
parent | 90ce052d82daa86e1e86ab4dac7fbba0cdda8680 (diff) | |
download | olsndot-6df66b77ba5b27bce5630694742f2dac57b8d3eb.tar.gz olsndot-6df66b77ba5b27bce5630694742f2dac57b8d3eb.tar.bz2 olsndot-6df66b77ba5b27bce5630694742f2dac57b8d3eb.zip |
Isolate usb-serial-rs485 tree
Diffstat (limited to 'tests/usb-serial-rs485/usb_cdcacm.h')
-rw-r--r-- | tests/usb-serial-rs485/usb_cdcacm.h | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/tests/usb-serial-rs485/usb_cdcacm.h b/tests/usb-serial-rs485/usb_cdcacm.h deleted file mode 100644 index d4e47e0..0000000 --- a/tests/usb-serial-rs485/usb_cdcacm.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of the libopencm3 project. - * - * Copyright (C) 2014 Karl Palsson <karlp@tweak.net.au> - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This library 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <http://www.gnu.org/licenses/>. - */ -/* - * This is the header file for a usb_cdcacm implmentation, usb_cdcacm.c is the - * platform independent portion, and usb_cdcacm-arch.c should be re-implemented - * for other platforms. - */ - -#ifndef USB_CDCACM_H -#define USB_CDCACM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <libopencm3/usb/usbd.h> -#include <libopencm3/usb/cdc.h> - - enum cdcacm_pin { - CDCACM_PIN_NONE, - CDCACM_PIN_LED_TX, - CDCACM_PIN_LED_RX, - CDCACM_PIN_RS485DE, - }; - - usbd_device * usb_cdcacm_init(const usbd_driver *driver, const char *userserial); - void usb_cdcacm_setup_pre_arch(void); - void usb_cdcacm_setup_post_arch(usbd_device *dev); - void usb_cdcacm_poll(usbd_device *usbd_dev); - void cdcacm_line_state_changed_cb(uint8_t linemask); - - /** - * Called by the cdcacm core to toggle pins as need be - * @param port which serial port, 0 normally - * @param pin logical pin - * @param set set or clear - */ - void cdcacm_arch_pin(int port, enum cdcacm_pin pin, bool set); - - /** - * enable the tx emmpty irq for the logical port - * @param port - * @param set - */ - void cdcacm_arch_txirq(int port, bool set); - - void cdcacm_arch_set_line_state(int port, uint8_t dtr, uint8_t rts); - - int glue_set_line_coding_cb(uint32_t baud, uint8_t databits, - enum usb_cdc_line_coding_bParityType cdc_parity, - enum usb_cdc_line_coding_bCharFormat cdc_stopbits); - -#ifdef __cplusplus -} -#endif - -#endif /* USB_CDCACM_H */ - |