mirror of
https://github.com/whowechina/iidx_pico.git
synced 2024-11-12 01:10:50 +01:00
Turntable hotswap
This commit is contained in:
parent
fd91994908
commit
71082ef029
20
.vscode/c_cpp_properties.json
vendored
Normal file
20
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"D:/Code/pico-sdk/**",
|
||||
"D:/Code/lib/**",
|
||||
"${workspaceFolder}/firmware/build/generated/pico_base"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"BOARD_IIDX_PICO"
|
||||
],
|
||||
"intelliSenseMode": "linux-gcc-arm64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
Binary file not shown.
@ -7,7 +7,7 @@
|
||||
|
||||
Features:
|
||||
* It's thin, really thin.
|
||||
* Turntable and keyboard are detachable with magnetic connector.
|
||||
* Turntable and keyboard are detachable with magnetic connector, hotswap!
|
||||
* HID lights, of course!
|
||||
* Multiple turntable effects.
|
||||
* Many live settings.
|
||||
|
@ -54,11 +54,11 @@ static uint16_t angle = 0;
|
||||
|
||||
void turntable_update()
|
||||
{
|
||||
uint8_t reg = 0x0c;
|
||||
i2c_write_blocking(TT_AS5600_I2C, as5600_addr, ®, 1, true);
|
||||
|
||||
uint8_t buf[2] = {0x0c};
|
||||
i2c_read_blocking(TT_AS5600_I2C, as5600_addr, buf, 2, false);
|
||||
uint8_t buf[2] = {0x0c, 0x00};
|
||||
i2c_write_blocking_until(TT_AS5600_I2C, as5600_addr, buf, 1, true,
|
||||
time_us_64() + 1000);
|
||||
i2c_read_blocking_until(TT_AS5600_I2C, as5600_addr, buf, 2, false,
|
||||
time_us_64() + 1000);
|
||||
|
||||
angle = ((uint16_t)buf[0]) << 8 | buf[1];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user