-
-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make quantum/split_common/serial.[ch] configurable #4419
Changes from 24 commits
fa97715
ad7aa7e
a7af2ad
e5eeb93
3cb3cd5
8da7fce
9c9cc5e
6d46519
33ed22b
f644ed6
58a0c9f
2a53ff6
9d6e92c
78d3368
6e93aee
f97e68e
b26a4b4
4d79a94
0f30eea
ab0373b
28fc69a
02e9405
dfdeca5
15b0021
ca802b5
6dd4bfd
9d3473a
67c84cb
18ebae1
7667492
eef1060
4870de3
d3888f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,21 +1,18 @@ | ||||||||||||
#ifndef MY_SERIAL_H | ||||||||||||
#define MY_SERIAL_H | ||||||||||||
|
||||||||||||
#include "config.h" | ||||||||||||
#include <stdbool.h> | ||||||||||||
|
||||||||||||
/* TODO: some defines for interrupt setup */ | ||||||||||||
#define SERIAL_PIN_DDR DDRD | ||||||||||||
#define SERIAL_PIN_PORT PORTD | ||||||||||||
#define SERIAL_PIN_INPUT PIND | ||||||||||||
#define SERIAL_PIN_MASK _BV(PD0) | ||||||||||||
#define SERIAL_PIN_INTERRUPT INT0_vect | ||||||||||||
|
||||||||||||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||||||||||||
#define SERIAL_MASTER_BUFFER_LENGTH 1 | ||||||||||||
|
||||||||||||
// Address location defines | ||||||||||||
#define SERIAL_BACKLIT_START 0x00 | ||||||||||||
// ///////////////////////////////////////////////////////////////// | ||||||||||||
// Need Soft Serial defines in config.h | ||||||||||||
// ///////////////////////////////////////////////////////////////// | ||||||||||||
// ex. | ||||||||||||
// /* Configuration of lower interface with the lower layer(hardware) of serial.c */ | ||||||||||||
// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could define the default here:
Suggested change
This way, there is no reason to define it elsewhere. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see |
||||||||||||
// | ||||||||||||
// /* Configuration of upper interface with the upper layer of serial.c */ | ||||||||||||
// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see #4419 (comment) |
||||||||||||
// #define SERIAL_MASTER_BUFFER_LENGTH 1 | ||||||||||||
|
||||||||||||
// Buffers for master - slave communication | ||||||||||||
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; | ||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* serial.h backward compatibility */ | ||
|
||
// #ifndef SOFT_SERIAL_PIN | ||
// #define SOFT_SERIAL_PIN D0 | ||
// #endif | ||
|
||
#ifndef SERIAL_SLAVE_BUFFER_LENGTH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't this be added to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do not worry, this |
||
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 | ||
#define SERIAL_MASTER_BUFFER_LENGTH 1 | ||
#endif | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ | |
#include <stdlib.h> | ||
#include "eeconfig.h" | ||
|
||
// backlight level store index in serial_master_buffer[] for slave to read | ||
#define SERIAL_BACKLIT_START 0x00 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be left in serial.h? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see |
||
|
||
#define SLAVE_I2C_ADDRESS 0x32 | ||
|
||
extern volatile bool isLeftHand; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be changed to something like
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The USE_I2C,USE_SERIAL problem can be discussed by me or someone else in the next next phase. I will not change it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I posted #4522. This is the solution to this problem I thought.