/** * Calculates all elements of the left- with those of the right array. * * @param p0 the result (left unchanged in case of an error) * @param p1 the left array * @param p2 the right array * @param p3 the operation abstraction * @param p4 the operand abstraction * @param p5 the left array count * @param p6 the right array count */ void calculate_all_array(void* p0, void* p1, void* p2, void* p3, void* p4, void* p5, void* p6) { log_terminated_message((void*) INFORMATION_LEVEL_LOG_MODEL, (void*) L"Calculate all array."); // The comparison result. int r = *FALSE_BOOLEAN_MEMORY_MODEL; compare_integer_equal((void*) &r, p5, p6); if (r != *FALSE_BOOLEAN_MEMORY_MODEL) { // CAUTION! Both, the left- or the right array count may be // handed over alternatively as count parametre, since they are equal. calculate_array(p0, p1, p2, p3, p4, p6, (void*) NUMBER_0_INTEGER_MEMORY_MODEL, (void*) NUMBER_0_INTEGER_MEMORY_MODEL); } else { log_terminated_message((void*) ERROR_LEVEL_LOG_MODEL, (void*) L"Could not calculate all array. The left array count is not equal to the right array count."); } }
void test_array(uint16_t pct, uint16_t t) { uint16_t i = 0; for(i = 0; i < 16; i++) { program_data[0].percent[i] = 0; program_data[0].t[i] = 0; } program_data[0].percent[1] = pct;//50.0% program_data[0].t[1] = 0; program_data[0].percent[2] = pct; program_data[0].t[2] = t;//5000us program_data[0].percent[3] = 0; program_data[0].t[3] = t; // program_data[0].percent[4] = 0; // program_data[0].t[4] = t; // program_data[0].CRC16_data = CRC16((uint8_t *)(program_data[0].percent), (sizeof(program)-2)); calculate_array(0); }