Home | History | Annotate | Line # | Download | only in usb
umcpmio_io.h revision 1.1
      1  1.1  brad /*	$NetBSD: umcpmio_io.h,v 1.1 2024/12/16 16:37:38 brad Exp $	*/
      2  1.1  brad 
      3  1.1  brad /*
      4  1.1  brad  * Copyright (c) 2024 Brad Spencer <brad (at) anduin.eldar.org>
      5  1.1  brad  *
      6  1.1  brad  * Permission to use, copy, modify, and distribute this software for any
      7  1.1  brad  * purpose with or without fee is hereby granted, provided that the above
      8  1.1  brad  * copyright notice and this permission notice appear in all copies.
      9  1.1  brad  *
     10  1.1  brad  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     11  1.1  brad  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     12  1.1  brad  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     13  1.1  brad  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     14  1.1  brad  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     15  1.1  brad  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     16  1.1  brad  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     17  1.1  brad  */
     18  1.1  brad 
     19  1.1  brad 
     20  1.1  brad #ifndef _UMCPMIO_IO_H_
     21  1.1  brad #define _UMCPMIO_IO_H_
     22  1.1  brad 
     23  1.1  brad #include <dev/usb/umcpmio_hid_reports.h>
     24  1.1  brad 
     25  1.1  brad struct umcpmio_ioctl_get_flash {
     26  1.1  brad 	uint8_t subcode;
     27  1.1  brad 	struct mcp2221_get_flash_res get_flash_res;
     28  1.1  brad };
     29  1.1  brad 
     30  1.1  brad struct umcpmio_ioctl_put_flash {
     31  1.1  brad 	uint8_t subcode;
     32  1.1  brad 	struct mcp2221_put_flash_req put_flash_req;
     33  1.1  brad 	struct mcp2221_put_flash_res put_flash_res;
     34  1.1  brad };
     35  1.1  brad 
     36  1.1  brad #define UMCPMIO_GET_STATUS	_IOR('m', 1, struct mcp2221_status_res)
     37  1.1  brad #define UMCPMIO_GET_SRAM	_IOR('m', 2, struct mcp2221_get_sram_res)
     38  1.1  brad #define UMCPMIO_GET_GP_CFG	_IOR('m', 3, struct mcp2221_get_gpio_cfg_res)
     39  1.1  brad #define UMCPMIO_GET_FLASH	_IOWR('m', 4, struct umcpmio_ioctl_get_flash)
     40  1.1  brad #define UMCPMIO_PUT_FLASH	_IOWR('m', 5, struct umcpmio_ioctl_put_flash)
     41  1.1  brad 
     42  1.1  brad 
     43  1.1  brad #endif
     44