|
| 1 | + |
| 2 | +#include "threadX_utils.h" |
| 3 | +#include "u_threads.h" |
| 4 | +#include "u_threads.h" |
| 5 | +#include "u_general.h" |
| 6 | + |
| 7 | +uint8_t _create_thread(TX_BYTE_POOL *byte_pool, thread_t *thread) { |
| 8 | + /* Create Threads */ |
| 9 | + //CATCH_ERROR(_create_thread(byte_pool, &_default_thread), 0); // Create Default thread. |
| 10 | + |
| 11 | + /* |
| 12 | + CATCH_ERROR(_create_thread(byte_pool, &_can_thread), U_SUCCESS); |
| 13 | + CATCH_ERROR(_create_thread(byte_pool, &_faults_thread), U_SUCCESS); |
| 14 | + CATCH_ERROR(_create_thread(byte_pool, &_statemachine_thread), U_SUCCESS); |
| 15 | + CATCH_ERROR(_create_thread(byte_pool, &_nonfunctional_data_thread), U_SUCCESS); |
| 16 | + CATCH_ERROR(_create_thread(byte_pool, &_tsms_thread), U_SUCCESS); |
| 17 | + CATCH_ERROR(_create_thread(byte_pool, &_control_thread), U_SUCCESS); |
| 18 | + CATCH_ERROR(_create_thread(byte_pool, &_pedals_thread), U_SUCCESS); |
| 19 | + */ |
| 20 | + // add more threads here if need |
| 21 | + |
| 22 | + DEBUG_PRINTLN("Ran threads_init()."); |
| 23 | + return U_SUCCESS; |
| 24 | +} |
| 25 | + |
| 26 | +uint8_t threads_init(TX_BYTE_POOL *byte_pool); |
| 27 | + |
| 28 | +uint8_t threads_init(TX_BYTE_POOL *byte_pool) { |
| 29 | + |
| 30 | + /* Create Threads */ |
| 31 | + //CATCH_ERROR(_create_thread(byte_pool, &_default_thread), U_SUCCESS); // Create Default thread. |
| 32 | + /* |
| 33 | + CATCH_ERROR(_create_thread(byte_pool, &_can_thread), U_SUCCESS); // Create CAN thread. |
| 34 | + CATCH_ERROR(_create_thread(byte_pool, &_faults_thread), U_SUCCESS); // Create Faults thread. |
| 35 | + CATCH_ERROR(_create_thread(byte_pool, &_statemachine_thread), U_SUCCESS); // Create State Machine thread. |
| 36 | + CATCH_ERROR(_create_thread(byte_pool, &_nonfunctional_data_thread), U_SUCCESS); // Create Nonfunctional Data thread. |
| 37 | + CATCH_ERROR(_create_thread(byte_pool, &_tsms_thread), U_SUCCESS); // Create TSMS thread. |
| 38 | + CATCH_ERROR(_create_thread(byte_pool, &_control_thread), U_SUCCESS); // Create Control thread. |
| 39 | + CATCH_ERROR(_create_thread(byte_pool, &_pedals_thread), U_SUCCESS); // Create Pedals thread. |
| 40 | + */ |
| 41 | + // add more threads here if need |
| 42 | + |
| 43 | + DEBUG_PRINTLN("Ran threads_init()."); |
| 44 | + return U_SUCCESS; |
| 45 | +} |
| 46 | + |
0 commit comments