Pol Henarejos
4edc506759
Fix build for non-pico boards.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-22 23:35:46 +02:00
Pol Henarejos
5f79a8c8ed
Fix ESP32 dynamic USB interfaces.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-24 09:22:25 +01:00
Pol Henarejos
a08abaed0f
Enable each USB interface independently depending on PHY parameters.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-22 23:25:31 +01:00
Pol Henarejos
f1b1382300
USB descriptors are now created dynamically.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-21 15:30:50 +01:00
Pol Henarejos
6625678c30
Rename CCID_ codes to PICOKEY_
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-05 18:21:24 +01:00
Pol Henarejos
0638409ff8
Refactor PHY to support more flexible and scalable architecture.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-05 00:29:13 +01:00
Pol Henarejos
a816b6f747
Added PHY options to control the brigthness of the LED and its dimming.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-09-27 20:55:49 +02:00
Benoît Allard
7a0b67f3cb
led: Rename 'blink' to 'mode'
2024-09-25 21:46:33 +02:00
Pol Henarejos
e8b060abb3
Call reset multicore before launching the thread.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-30 00:33:31 +02:00
Pol Henarejos
c2eda3ca53
Fix USB/CCID writes when APDU is longer than 64 bytes.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-26 22:41:46 +02:00
Pol Henarejos
ac2a6c1052
Init low flash in core1 in emulation mode.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-25 00:11:10 +02:00
Pol Henarejos
7a88a2b8e7
Improved multicore synchronization. Now they exchange signals and protect areas atomically.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-23 19:24:18 +02:00
Pol Henarejos
65fea84df1
Fix warnings.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-23 13:17:10 +02:00
Pol Henarejos
fa6292118d
Major refactor of USB CCID and USB HID interfaces. All interfaces are rewritten.
...
With this new scheme we ensure that:
- memcpy's are reduced.
- no race conditions are performed.
- critical areas are protected.
- callbacks are executed immediately.
- write's are executed after the positive report is received.
- no usb middle interface anymore.
- CCID and HID are totally independent.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-23 10:02:19 +02:00
Pol Henarejos
7c76a71f33
Fix emulation build.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-19 13:18:03 +02:00
Pol Henarejos
0f24d17456
thread management is now in usb stuff. It ensures to launch an apdu/cbor thread depending on the processed packet.
...
It also includes a usb_rx_more to advance the rx pointer. It is useful to multiplex usb packets.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-19 00:02:15 +02:00
Pol Henarejos
f4ad8e1af2
Fix idVendor, idProduct allocation for Pico Patcher.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-07-15 14:41:08 +02:00
Pol Henarejos
246ed5cf19
Fix when setting options and taking VIDPID values.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-06-21 22:07:28 +02:00
Pol Henarejos
218441a45a
Added support for enable/disable Web CCID on the fly.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-06-19 23:28:55 +02:00
Pol Henarejos
a0e55ebfae
Fix tusb initialization.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-06-19 22:30:07 +02:00
Pol Henarejos
59597a0a68
Merge branch 'esp32'
2024-06-19 22:01:46 +02:00
Pol Henarejos
d458250887
Add PHY options and PHY_WCID.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-06-19 22:00:55 +02:00
Pol Henarejos
af20b4f894
Merge branch 'main' into esp32
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-28 19:26:08 +02:00
Pol Henarejos
fc5f4299cc
Fix emulation build.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-17 11:56:54 +02:00
Pol Henarejos
cf1e076453
Introducing EF_PHY to store PHY (VIDPID and LED no.).
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-17 11:40:01 +02:00
Pol Henarejos
019c5929a2
Remove carriage return \r for better debug.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-17 11:21:10 +02:00
Pol Henarejos
ade730ffb5
Introducing EF_PHY to store PHY (VIDPID and LED no.).
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-16 23:22:11 +02:00
Pol Henarejos
6f7ab69a9d
Added support for dynamic USB_VID / USB_PID.
...
It can be changed on runtime without rebuilding or patching.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-16 00:04:23 +02:00
Pol Henarejos
8d86a8c56b
Add procedure to compute unique ID at startup.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-15 23:44:51 +02:00
Pol Henarejos
7def35f87c
Remove carriage return \r for better debug.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-10 18:16:38 +02:00
Pol Henarejos
49f05e9e13
Now it builds the image.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-05 17:57:56 +02:00
Pol Henarejos
023039deb2
Attempting to add support to esp32s3.
...
Will it work? Who knows...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-04 21:01:55 +02:00
Pol Henarejos
e055d4cfc9
Added support for WebCCID.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-03-13 17:24:20 +01:00
Pol Henarejos
a9dc6fd7f8
Added support for building emulation in Windows.
...
It has not been tested but it should not break any linux build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-01-01 01:54:49 +01:00
Pol Henarejos
d0dc786f74
Rename project to Pico Keys SDK to avoid confusions with Pico Fido and Pico OpenPGP.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-11-06 13:32:28 +01:00
Pol Henarejos
899a7ed609
Move some functions from HID to fido callbacks.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-11-06 13:01:10 +01:00
Pol Henarejos
0663c694ef
Move timers.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-10-31 17:33:47 +01:00
Pol Henarejos
3182d1e2e6
Fixed potential crash.
...
board_button_read() disables interrupts and cannot be parallelized when flash is being used. It is imperative that core1 must not use flash during the board_button_read(). Since it is not feasible to put mutexes in *every* flash memory read/write in core1, it is preferable to wait until core1 finishes command execution.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-10-31 00:40:38 +01:00
Pol Henarejos
c11d403f12
Added support for OTP interface.
...
This interface enables a HID Keyboard interface to send keystrokes to host. Also, it enables bidirectional flow through set/get report with 8-bytes chunked frames of 70 bytes.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-03-28 23:32:43 +02:00
Pol Henarejos
86613453ae
Sending timeout command.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-03-03 00:48:42 +01:00
Pol Henarejos
16b4fa6ca3
Emulation is now a higher define which also accepts interfaces.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-02-23 07:57:35 +01:00
Pol Henarejos
31f899416c
Using new style.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-02-15 00:14:10 +01:00
Pol Henarejos
12bdcbd1f9
Harmonizing coding style.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-02-14 23:23:57 +01:00
Pol Henarejos
4919eb980f
Added a major refactoring to include Emulated interface.
...
It works in combination with virtualsmarcard module (vpcd). It properly installed, it creates a virtual reader that can be interfaced via PCSC+vcpd. At user app level, it has no difference of having a physical smart card.
At this moment, it only works emulating a CCID interface.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-01-09 18:06:21 +01:00
Pol Henarejos
411755dee4
Adding a secondary HID interface that emulates a keyboard.
...
With it, an app can send a password directly to the host, like it is typed by user.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-12-30 01:41:49 +01:00
Pol Henarejos
20bd2c8b41
Fix writting read buffer for itf > 0.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-12-30 01:40:22 +01:00
Pol Henarejos
e5825df5cb
Added capability to add multiple interfaces: HID and CCID at compile time.
...
Depending on compiling flags, HID and/or CCID may be enabled independently and run simultaneously.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-12-20 23:41:24 +01:00
Pol Henarejos
0bc13df1a2
Queues are emptied at begining of card thread.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-11-28 18:54:01 +01:00
Pol Henarejos
8f14db677e
Fix strange bug when usb cannot write.
...
In this case, the buffer is kept until the next success call.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-09-29 23:11:49 +02:00
Pol Henarejos
3912775ccb
Fix writting large packets.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-09-27 12:23:16 +02:00