LoRaWANCH341 Library
Loading...
Searching...
No Matches
Namespaces | Variables
CH341Config.hpp File Reference

Configuration constants for the CH341 USB to SPI adapter. More...

#include <cstdint>
Include dependency graph for CH341Config.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  CH341Config
 

Variables

constexpr uint16_t CH341Config::VENDOR_ID = 0x1A86
 
constexpr uint16_t CH341Config::PRODUCT_ID = 0x5512
 
constexpr uint8_t CH341Config::BULK_WRITE_EP = 0x02
 
constexpr uint8_t CH341Config::BULK_READ_EP = 0x82
 
constexpr uint8_t CH341Config::PACKET_LENGTH = 0x20
 
constexpr uint16_t CH341Config::MAX_PACKETS = 256
 
constexpr uint16_t CH341Config::MAX_PACKET_LEN = PACKET_LENGTH * MAX_PACKETS
 
constexpr uint8_t CH341Config::PIN_MISO = 0x02
 
constexpr uint8_t CH341Config::PIN_MOSI = 0x04
 
constexpr uint8_t CH341Config::PIN_SCK = 0x08
 
constexpr uint8_t CH341Config::PIN_CS = 0x20
 
constexpr uint8_t CH341Config::CMD_SPI_STREAM = 0xA8
 
constexpr uint8_t CH341Config::CMD_UIO_STREAM = 0xAB
 
constexpr uint8_t CH341Config::CMD_UIO_STM_OUT = 0x80
 
constexpr uint8_t CH341Config::CMD_UIO_STM_DIR = 0x40
 
constexpr uint8_t CH341Config::CMD_UIO_STM_END = 0x20
 
constexpr uint8_t CH341Config::CMD_I2C_STREAM = 0xAA
 
constexpr uint8_t CH341Config::CMD_I2C_STM_SET = 0x60
 
constexpr uint8_t CH341Config::CMD_I2C_STM_END = 0x00
 
constexpr unsigned int CH341Config::USB_TIMEOUT = 1000
 

Detailed Description

Configuration constants for the CH341 USB to SPI adapter.

Author
Sergio Pérez
Date
2025

@license MIT License Copyright (c) 2025 Sergio Pérez

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.