diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-06-29 18:14:39 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-06-30 19:53:04 -0400 |
commit | e8356afa26dc4d04361b3b66c728ae1ecd17b4e3 (patch) | |
tree | eeda84122ff646b05046df58416cc4e187975332 /src/pru/internal.h | |
parent | c1bd628ce524f52851cf2bbcb4bc8bbc373dcd6b (diff) | |
download | kutter-e8356afa26dc4d04361b3b66c728ae1ecd17b4e3.tar.gz kutter-e8356afa26dc4d04361b3b66c728ae1ecd17b4e3.tar.xz kutter-e8356afa26dc4d04361b3b66c728ae1ecd17b4e3.zip |
pru: Rework command processing so that most of it is done on pru0
Change the command dispatch and response generation so that most of
the work is done on pru0 instead of pru1. This allows more code to
fit into the limited space on pru1.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/pru/internal.h')
-rw-r--r-- | src/pru/internal.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pru/internal.h b/src/pru/internal.h index 109dd3a2..1a2983d2 100644 --- a/src/pru/internal.h +++ b/src/pru/internal.h @@ -19,16 +19,22 @@ #define R31_WRITE_IRQ_SELECT (1<<5) #define R31_WRITE_IRQ_OFFSET 16 +#define ALT_PRU_PTR(ptr) ((typeof(ptr))((uint32_t)(ptr) ^ 0x2000)) + // Layout of shared memory struct shared_mem { uint32_t signal; - uint32_t read_pos, read_count; - char read_data[512]; + const struct command_parser *next_command; + uint32_t next_command_args[16]; uint32_t send_push_pos, send_pop_pos; struct { uint32_t count; char data[64]; } send_data[4]; + const struct command_parser *command_index; + uint32_t command_index_size; + const struct command_parser *shutdown_handler; + char read_data[512]; }; #define SIGNAL_PRU0_WAITING 0xefefefef |