Skip to content

Commit 20f830f

Browse files
Version 1.2.2 Release
Added Changelog.MD file, read that
1 parent a41a343 commit 20f830f

21 files changed

+1677
-989
lines changed

ChangeLog.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Change Log
2+
3+
## Version 1.0.0
4+
Initial Release.
5+
6+
## Version 1.1.1
7+
- Added KVM and USB hub support
8+
- Added different mouse movement types
9+
- Added "cosine mouse smoothing"
10+
- Small bug fixes
11+
- Latest version of the Pico-SDK
12+
- Latest but modified version of TinyUSB
13+
14+
## Version 1.2.2
15+
- Modified terminal code to be easier to translate.
16+
- German language translation added to serial terminal.
17+
- Multicore Processing. The pi pico has two cores baked into it so might as well use them. The second core is currently dedicated to transmitting the serial mouse data over UART and the first core is dedicated to handing the USB mouse, plus the serial terminal. This should keep the report rate consistant while keeping lag to a minimum.
18+
- Nand wear leveling for saving configuration. Should extend the life of the Pico 200 fold.
19+
- Added Support for 19200 baud rate.
20+
- Changed the Dip Switch 6 to toggle between 19200 and 1200 baud rates.
21+
- PWR LED now flashes while the adapater is in serial terminal mode.
22+
- While adpater is in serial terminal mode changes to the dipswitches are ignored. This was an easy way to ruin your day before!
23+
- Changed how Coasting movement type worked. Should feel the same but work more consistantly.
24+

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,4 @@ The build environment is a normal PicoSDK setup, there are several guides out th
194194

195195
**PicoSDK version 1.3.0**
196196
The version of TinyUSB used in this project was customized. The customized version of TinyUSB can be found in the firmware folder. If you want to compile the firmware yourself you will need to replace the stock TinyUSB with the customized version found here
197+

binary/old version/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Included in case of bugs
89 KB
Binary file not shown.
File renamed without changes.

binary/usb-2-232-ver_1.2.2_DE.uf2

144 KB
Binary file not shown.

binary/usb-2-232-ver_1.2.2_EN.uf2

144 KB
Binary file not shown.

firmware/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@ add_executable(usb-2-232
3333
include/hid_app.c
3434
include/serial.c
3535
include/utils.c
36+
include/core_1.c
3637
)
3738

3839
# Make sure TinyUSB can find tusb_config.h
3940
target_include_directories(usb-2-232 PUBLIC ${CMAKE_CURRENT_LIST_DIR})
4041

4142
# In addition to pico_stdlib required for common PicoSDK functionality, add dependency on tinyusb_host
4243
# for TinyUSB device support and tinyusb_board for the additional board support library used by the example
43-
target_link_libraries(usb-2-232 pico_stdlib hardware_flash hardware_sync tinyusb_host tinyusb_board)
44+
target_link_libraries(usb-2-232 pico_stdlib hardware_flash hardware_sync tinyusb_host tinyusb_board pico_multicore)
4445

4546
include_directories(include/)
4647
link_directories(include/)

firmware/debug.log

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[0318/015202.389:ERROR:registration_protocol_win.cc(102)] CreateFile: The system cannot find the file specified. (0x2)
2+
[0319/041622.562:ERROR:registration_protocol_win.cc(102)] CreateFile: The system cannot find the file specified. (0x2)

firmware/default_config.h

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// DEBUG //
55
/*---------------------------------------*/
66

7-
// All this really does is give printf's out via UART1
7+
// All this really does is give printf's out via UART0
88
#define DEBUG false // Debug Flag for things
99

1010

@@ -18,7 +18,7 @@
1818
#define DIPSW_75XYSPEED 11 // Dip Switch 3 | 75% speed | Dip 3 + 4 depressed will set mouse speed to 25%
1919
#define DIPSW_50XYSPEED 12 // Dip Switch 4 | 50% speed | Dip 3 + 4 depressed will set mouse speed to 25%
2020
#define DIPSW_7N2 13 // Dip Switch 5 | 7N2 format
21-
#define DIPSW_2400 14 // Dip Switch 6 | Reserved
21+
#define DIPSW_19200 14 // Dip Switch 6 | High Buad Rate
2222

2323
// LEDS
2424
#define LED_PWR 2
@@ -56,18 +56,15 @@ static bool default_doublestopbit = false;
5656

5757
// Baud Rate
5858
/* ---------- Acceptible baud rates ----------
59-
1200 | 2400 | 4800 | 9600
59+
1200 | 2400 | 4800 | 9600 | 19200
6060
Recommended value is 1200
6161
6262
Any values outside of the ones above, are rejected
6363
and the default value of 1200 is used.
6464
6565
Note:
6666
As far as I can see from docs, serial mice ran at
67-
1200 Baud, so any value higher then that may result in issues.
68-
Max value is 9600 because of hardware limits of the
69-
max232
70-
67+
1200 Baud, so you will need modified drivers for higher baud rates
7168
------------------------------------------ */
7269

7370
static uint16_t default_baudrate = 1200;
@@ -108,9 +105,9 @@ static bool default_invert_y = false;
108105
/==-- COAST:
109106
/==-- Unlike Additive and Average; Coast does not throw away extra movement when the mouse is moved quickly, instead it incrementally sends out the movement.
110107
/==-- Results in a cursor feeling like it's skidding along on ice at high speeds. I don't know where it would be useful but it's fun to mess with!
111-
/==-- 0- > Additive axis movement | 1 -> Average axis movement | 2-> Coast
108+
/==-- 0 -> Additive axis movement | 1 -> Average axis movement | 2-> Coast
112109
*/
113-
static uint8_t mouse_movt_type = 0;
110+
static uint8_t default_mouse_movt_type = 0;
114111

115112
/*
116113
/==-- COSINE SMOOTHING
@@ -119,7 +116,16 @@ static uint8_t mouse_movt_type = 0;
119116
/==-- It could be useful for point and click DOS games but is not recommended for games where mouse movement controls a camera.
120117
/==-- 0 -> Disabled | 1 -> Low | 2 -> Medium | 3 -> High | 4 - > Very High
121118
*/
122-
static uint8_t use_cosine_smoothing = 0;
119+
static uint8_t default_use_cosine_smoothing = 0;
120+
121+
122+
// Added version 1.2.X
123+
/*
124+
/==-- LANGUAGE
125+
/==-- 0 -> English | 1 -> German
126+
*/
127+
static uint8_t default_language = 1;
128+
123129

124130
/*---------------------------------------*/
125131
// Advanced Settings //
@@ -128,14 +134,15 @@ static uint8_t use_cosine_smoothing = 0;
128134

129135
/* ---------------------------------------------------------- */
130136
/* Numbers for Serial Speed and Delay times
131-
- Thanks to Aviancer for the numbers | https://github.com/Aviancer/amouse
132137
133-
1200 baud (bits/s) is 133.333333333... bytes/s
134-
44.44.. updates per second with 3 bytes.
135-
33.25.. updates per second with 4 bytes.
136-
~0.0075 seconds per byte, target time calculated for 4 bytes.
137138
138-
SERIALDELAY = (((7500 / (BAUD_RATE / 1200)) * NumberOfBytes) + TXWIGGLEROOM )
139+
// Works for bits per microsecond
140+
1 bit = ( 1000000 / (real_baudrate) );
141+
142+
// Work out the time for 1, 3, 4 mouse packet(s)
143+
1 Packet = (1 bit * (doublestopbit ? 9 : 8) ) + TXWIGGLEROOM;
144+
3 Packets = 1 Packet * 3;
145+
4 Packets = 1 Packet * 4;
139146
140147
SerialDelay is the time between when serial packets are sent, based on the math above */
141148
/* ---------------------------------------------------------- */

0 commit comments

Comments
 (0)