Skip to content

Commit

Permalink
Merge pull request #1 from heiso/dev
Browse files Browse the repository at this point in the history
wip
  • Loading branch information
heiso authored May 12, 2024
2 parents 0b4093a + e863455 commit 7be1e0f
Show file tree
Hide file tree
Showing 20 changed files with 1,692 additions and 1,565 deletions.
8 changes: 8 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"port": 9229,
"request": "attach",
"skipFiles": ["<node_internals>/**"],
"type": "pwa-node",
"restart": true
},
{
"name": "Cortex Debug",
"cwd": "${workspaceRoot}/firmware",
Expand Down
20 changes: 5 additions & 15 deletions firmware/Core/Inc/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extern "C" {

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */
struct calibration {
struct __attribute__((__packed__)) calibration {
uint16_t cycles_count;
uint16_t idle_value;
uint16_t max_distance;
Expand All @@ -72,7 +72,7 @@ enum direction {
GOING_DOWN,
};

struct state {
struct __attribute__((__packed__)) state {
uint16_t value;
uint16_t distance;
uint8_t distance_8bits;
Expand All @@ -89,7 +89,7 @@ enum actuation_status {
STATUS_RAPID_TRIGGER_RESET
};

struct actuation {
struct __attribute__((__packed__)) actuation {
enum direction direction;
uint8_t direction_changed_point;
enum actuation_status status;
Expand All @@ -107,7 +107,7 @@ enum key_type {
KEY_TYPE_CONSUMER_CONTROL,
};

struct layer {
struct __attribute__((__packed__)) layer {
enum key_type type;
uint16_t value;
};
Expand All @@ -118,7 +118,7 @@ enum {
LAYERS_COUNT
};

struct key {
struct __attribute__((__packed__)) key {
uint8_t is_enabled;
uint8_t row;
uint8_t column;
Expand All @@ -130,16 +130,6 @@ struct key {
struct actuation actuation;
};

struct serial_key {
uint8_t row;
uint8_t column;
uint16_t idle_value;
uint16_t max_distance;
uint16_t value;
uint8_t distance_8bits;
enum actuation_status status;
};

struct user_config {
uint8_t trigger_offset;
uint8_t reset_threshold;
Expand Down
Loading

0 comments on commit 7be1e0f

Please sign in to comment.