mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-28 17:11:23 +02:00
Now it builds the image.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -15,28 +15,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
// Pico
|
||||
#include "pico/stdlib.h"
|
||||
|
||||
// For memcpy
|
||||
#include <string.h>
|
||||
|
||||
// Include descriptor struct definitions
|
||||
//#include "usb_common.h"
|
||||
// USB register definitions from pico-sdk
|
||||
#include "hardware/regs/usb.h"
|
||||
// USB hardware struct definitions from pico-sdk
|
||||
#include "hardware/structs/usb.h"
|
||||
// For interrupt enable and numbers
|
||||
#include "hardware/irq.h"
|
||||
// For resetting the USB controller
|
||||
#include "hardware/resets.h"
|
||||
|
||||
#include "random.h"
|
||||
#include "pico_keys.h"
|
||||
#if !defined(ENABLE_EMULATION) && !defined(ESP_PLATFORM)
|
||||
#include "hardware/rtc.h"
|
||||
#endif
|
||||
#include "tusb.h"
|
||||
#include "ccid.h"
|
||||
#include "device/usbd_pvt.h"
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#ifndef _TUSB_CONFIG_H_
|
||||
#define _TUSB_CONFIG_H_
|
||||
|
||||
#include "usb.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -64,7 +62,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef CFG_TUSB_OS
|
||||
//#define CFG_TUSB_OS OPT_OS_PICO
|
||||
#define CFG_TUSB_OS OPT_OS_FREERTOS
|
||||
#endif
|
||||
|
||||
#ifndef CFG_TUSB_DEBUG
|
||||
@@ -115,7 +113,7 @@ extern "C" {
|
||||
#ifdef USB_ITF_CCID
|
||||
#define CFG_TUD_VENDOR 2
|
||||
#else
|
||||
#define CFG_TUD_VENDOR 0
|
||||
#define CFG_TUD_VENDOR 2
|
||||
#endif
|
||||
|
||||
// HID buffer size Should be sufficient to hold ID (if any) + Data
|
||||
|
||||
@@ -153,7 +153,7 @@ void usb_clear_rx(uint8_t itf) {
|
||||
|
||||
#define USB_BCD 0x0200
|
||||
|
||||
#if !defined(ENABLE_EMULATION) && !defined(ESP_PLATFORM)
|
||||
#if !defined(ENABLE_EMULATION)
|
||||
queue_t usb_to_card_q;
|
||||
queue_t card_to_usb_q;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user