pru: Add hack to shutdown the PRU from a simple command request

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor committed 2017-06-30 19:54:33 -04:00
1 parent e8356afa26
commit da3569c490
1 file changed
+6
+6
View File
@@ -113,6 +113,12 @@ check_can_read(void)
if (ret)
return;
// Check for force shutdown request
if (len == 15 && p[14] == '\n' && memcmp(p, "FORCE_SHUTDOWN\n", 15) == 0) {
send_pru1_shutdown();
return;
}
// Parse data into message blocks
for (;;) {
uint8_t pop_count, msglen = len > 64 ? 64 : len;