Skip to content
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

Document syncing layer change callback across halves #23298

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Extra, simpler, example of using split communication
  • Loading branch information
BlueDrink9 authored Mar 17, 2024
commit a47901ff8064fd4db37801fe0d33cf06e701e1ce
20 changes: 20 additions & 0 deletions docs/feature_split_keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,26 @@ By default, the inbound and outbound data is limited to a maximum of 32 bytes ea
#define RPC_S2M_BUFFER_SIZE 48
```

If you only need to transfer a small integer one way, or just run a function on the slave, this can be simplified to:

```c
#include "transactions.h"

void func_to_call(uint8_t data, const void* unused, uint8_t unused2, void* unused3) {
do_something_with(data);
}
void keyboard_post_init_user(void) {
transaction_register_rpc(USER_SYNC_A, func_to_call);
}

void housekeeping_task_user(void) {
if (is_keyboard_master()){
transaction_rpc_exec(USER_SYNC_A, 24, NULL, 0, NULL);
}
}

```

### Hardware Configuration Options

There are some settings that you may need to configure, based on how the hardware is set up.
Expand Down
Loading