Revision b23ca7cc
test/periphery-lld/A3906_v1/aos_test_A3906.c | ||
---|---|---|
85 | 85 |
void _wheelDirectionTest(BaseSequentialStream* stream, aos_test_a3906data_t* data, wheel_t wheel, direction_t direction, aos_testresult_t* result) |
86 | 86 |
{ |
87 | 87 |
// local variables |
88 |
uint32_t status;
|
|
88 |
int32_t status; |
|
89 | 89 |
bool qei_valid; |
90 | 90 |
apalQEICount_t qei_count[2]; |
91 | 91 |
apalQEIDirection_t qei_direction; |
... | ... | |
96 | 96 |
status = apalQEIGetPosition((wheel == WHEEL_LEFT) ? data->qei.left : data->qei.right, &qei_count[0]); |
97 | 97 |
// increase PWM incrementally and read QEI data |
98 | 98 |
for (apalPWMwidth_t pwm_width = APAL_PWM_WIDTH_MIN; pwm_width < APAL_PWM_WIDTH_MAX; ++pwm_width) { |
99 |
status |= a3906_lld_set_pwm(data->pwm.driver, (wheel == WHEEL_LEFT) ?
|
|
99 |
status = a3906_lld_set_pwm(data->pwm.driver, (wheel == WHEEL_LEFT) ? |
|
100 | 100 |
((direction == DIRECTION_FORWARD) ? data->pwm.channel.left_forward : data->pwm.channel.left_backward) : |
101 | 101 |
((direction == DIRECTION_FORWARD) ? data->pwm.channel.right_forward : data->pwm.channel.right_backward), |
102 | 102 |
pwm_width); |
... | ... | |
138 | 138 |
void _wheelSpeedTest(BaseSequentialStream* stream, aos_test_a3906data_t* data, wheel_t wheel, direction_t direction, aos_testresult_t* result) |
139 | 139 |
{ |
140 | 140 |
// local variables |
141 |
uint32_t status;
|
|
141 |
int32_t status; |
|
142 | 142 |
apalQEICount_t qei_range; |
143 | 143 |
apalQEICount_t qei_count[2] = {0}; |
144 | 144 |
apalQEICount_t qei_increments[2] = {0}; |
... | ... | |
216 | 216 |
|
217 | 217 |
// local variables |
218 | 218 |
aos_testresult_t result = {0, 0}; |
219 |
uint32_t status = 0;
|
|
219 |
int32_t status;
|
|
220 | 220 |
a3906_lld_power_t power_state; |
221 | 221 |
apalQEICount_t qei_count[2][2]; |
222 | 222 |
uint32_t timeout_counter; |
test/periphery-lld/AT24C01B_v1/aos_test_AT24C01B.c | ||
---|---|---|
84 | 84 |
|
85 | 85 |
// local variables |
86 | 86 |
aos_testresult_t result = {0, 0}; |
87 |
uint32_t status = 0;
|
|
87 |
int32_t status;
|
|
88 | 88 |
uint8_t page_data[AT24C01B_LLD_PAGE_SIZE_BYTES]; |
89 | 89 |
uint8_t original_data[AT24C01B_LLD_PAGE_SIZE_BYTES]; |
90 | 90 |
uint8_t read_data[AT24C01B_LLD_PAGE_SIZE_BYTES]; |
test/periphery-lld/AT42QT1050_v1/aos_test_AT42QT1050.c | ||
---|---|---|
43 | 43 |
/* LOCAL FUNCTIONS */ |
44 | 44 |
/******************************************************************************/ |
45 | 45 |
|
46 |
void print_settings(apalExitStatus_t* status, BaseSequentialStream* stream, const aos_test_t* test) {
|
|
46 |
void print_settings(int32_t* status, BaseSequentialStream* stream, const aos_test_t* test) {
|
|
47 | 47 |
chprintf(stream, "settings...\n"); |
48 | 48 |
|
49 | 49 |
uint8_t test8; |
... | ... | |
96 | 96 |
|
97 | 97 |
} |
98 | 98 |
|
99 |
void show_live(const uint8_t first_key, apalExitStatus_t* status,
|
|
99 |
void show_live(const uint8_t first_key, int32_t* status,
|
|
100 | 100 |
BaseSequentialStream* stream, const aos_test_t* test) { |
101 | 101 |
|
102 | 102 |
apalDbgAssert(first_key<5); |
... | ... | |
192 | 192 |
|
193 | 193 |
// local variables |
194 | 194 |
aos_testresult_t result = {0, 0}; |
195 |
apalExitStatus_t status;
|
|
195 |
int32_t status;
|
|
196 | 196 |
uint8_t test_8; |
197 | 197 |
bool error; |
198 | 198 |
|
test/periphery-lld/HMC5883L_v1/aos_test_HMC5883L.c | ||
---|---|---|
59 | 59 |
|
60 | 60 |
// local variables |
61 | 61 |
aos_testresult_t result = {0, 0}; |
62 |
uint32_t status;
|
|
62 |
int32_t status; |
|
63 | 63 |
uint8_t rxbuffer[3]; |
64 | 64 |
uint8_t data; |
65 | 65 |
uint8_t conf = 0x70; |
test/periphery-lld/L3G4200D_v1/aos_test_L3G4200D.c | ||
---|---|---|
59 | 59 |
|
60 | 60 |
// local variables |
61 | 61 |
aos_testresult_t result = {0, 0}; |
62 |
uint32_t status;
|
|
62 |
int32_t status; |
|
63 | 63 |
uint8_t data = 0; |
64 | 64 |
uint8_t write_data[5]; |
65 | 65 |
uint8_t read_data[5]; |
test/periphery-lld/LED_v1/aos_test_LED.c | ||
---|---|---|
59 | 59 |
|
60 | 60 |
// local variables |
61 | 61 |
aos_testresult_t result = {0, 0}; |
62 |
int32_t status = AOS_OK;
|
|
62 |
int32_t status; |
|
63 | 63 |
|
64 | 64 |
chprintf(stream, "lighting up for two seconds...\n"); |
65 | 65 |
led_lld_state_t state = LED_LLD_STATE_ON; |
test/periphery-lld/MIC9404x_v1/aos_test_MIC9404x.c | ||
---|---|---|
61 | 61 |
mic9404x_lld_state_t state_orig; |
62 | 62 |
mic9404x_lld_state_t state; |
63 | 63 |
aos_testresult_t result = {0, 0}; |
64 |
uint32_t status = APAL_STATUS_OK;
|
|
64 |
int32_t status;
|
|
65 | 65 |
|
66 | 66 |
chprintf(stream, "reading current status...\n"); |
67 | 67 |
status = mic9404x_lld_get(((aos_test_mic9404data_t*)test->data)->driver, &state_orig); |
test/periphery-lld/MPR121_v1/aos_test_MPR121.c | ||
---|---|---|
53 | 53 |
|
54 | 54 |
// local variables |
55 | 55 |
aos_testresult_t result = {0, 0}; |
56 |
uint32_t status;
|
|
56 |
int32_t status; |
|
57 | 57 |
mpr121_lld_config_t cfg; |
58 | 58 |
uint8_t data = 0; |
59 | 59 |
uint8_t wdata = 0; |
test/periphery-lld/MPU6050_v1/aos_test_MPU6050.c | ||
---|---|---|
50 | 50 |
aos_testresult_t result = {0, 0}; |
51 | 51 |
|
52 | 52 |
uint8_t data[1] = {0}; |
53 |
int32_t status = 0;
|
|
53 |
int32_t status; |
|
54 | 54 |
|
55 | 55 |
status = mpu6050_lld_read_register(((aos_test_mpu6050data_t*)test->data)->mpu, MPU6050_LLD_WHO_AM_I, data, 1, ((aos_test_mpu6050data_t*)test->data)->timeout); |
56 | 56 |
if (status == APAL_STATUS_OK && data[0] == MPU6050_I_AM) { |
test/periphery-lld/PCAL6524_v1/aos_test_PCAL6524.c | ||
---|---|---|
53 | 53 |
|
54 | 54 |
// local variables |
55 | 55 |
aos_testresult_t result = {0, 0}; |
56 |
uint32_t status;
|
|
56 |
int32_t status; |
|
57 | 57 |
uint8_t buffer[24]; |
58 | 58 |
memset(buffer, 0xAA, sizeof(buffer)); |
59 | 59 |
|
test/periphery-lld/PKxxxExxx_v1/aos_test_PKxxxExxx.c | ||
---|---|---|
51 | 51 |
|
52 | 52 |
// local variables |
53 | 53 |
aos_testresult_t result = {0, 0}; |
54 |
uint32_t status;
|
|
54 |
int32_t status; |
|
55 | 55 |
|
56 | 56 |
chprintf(stream, "checking PWM configuration...\n"); |
57 | 57 |
status = pkxxxexxx_lld_checkPWMconfiguration(((aos_test_pkxxxexxxdata_t*)test->data)->driver); |
test/periphery-lld/TLC5947_v1/aos_test_TLC5947.c | ||
---|---|---|
61 | 61 |
|
62 | 62 |
// local variables |
63 | 63 |
aos_testresult_t result = {0, 0}; |
64 |
int32_t status = 0;
|
|
64 |
int32_t status; |
|
65 | 65 |
tlc5947_lld_blank_t blank; |
66 | 66 |
tlc5947_lld_buffer_t buffer; |
67 | 67 |
|
test/periphery-lld/TPS20xxB_v1/aos_test_TPS20xxB.c | ||
---|---|---|
59 | 59 |
|
60 | 60 |
// local variables |
61 | 61 |
aos_testresult_t result = {0, 0}; |
62 |
uint32_t status = AOS_OK;
|
|
62 |
int32_t status;
|
|
63 | 63 |
tps20xxb_lld_enable_t en; |
64 | 64 |
tps20xxb_lld_overcurrent_t oc; |
65 | 65 |
|
test/periphery-lld/TPS6211x_v1_INA219_v1/aos_test_TPS6211x_INA219.c | ||
---|---|---|
51 | 51 |
|
52 | 52 |
// local variables |
53 | 53 |
aos_testresult_t result = {0, 0}; |
54 |
uint32_t status;
|
|
54 |
int32_t status; |
|
55 | 55 |
tps6211x_lld_power_en_t power; |
56 | 56 |
uint32_t v_buson, v_busoff; |
57 | 57 |
|
test/periphery-lld/VCNL4020_v1/aos_test_VCNL4020.c | ||
---|---|---|
57 | 57 |
|
58 | 58 |
// local variables |
59 | 59 |
aos_testresult_t result = {0, 0}; |
60 |
uint32_t status;
|
|
60 |
int32_t status; |
|
61 | 61 |
uint8_t reg_buf[4] = {0}; |
62 | 62 |
uint8_t* reg_8 = (uint8_t*)(reg_buf); |
63 | 63 |
uint16_t* reg_16 = (uint16_t*)(reg_buf); |
test/periphery-lld/bq241xx_v1/aos_test_bq241xx.c | ||
---|---|---|
52 | 52 |
|
53 | 53 |
// local variables |
54 | 54 |
aos_testresult_t result = {0, 0}; |
55 |
uint32_t status;
|
|
55 |
int32_t status; |
|
56 | 56 |
bq241xx_lld_enable_t en[3]; |
57 | 57 |
bq241xx_lld_charge_state_t charge; |
58 | 58 |
|
test/periphery-lld/bq27500_v1/aos_test_bq27500.c | ||
---|---|---|
281 | 281 |
|
282 | 282 |
// local variables |
283 | 283 |
aos_testresult_t result = {0, 0}; |
284 |
uint32_t status;
|
|
284 |
int32_t status; |
|
285 | 285 |
bq27500_lld_batlow_t bl; |
286 | 286 |
bq27500_lld_batgood_t bg; |
287 | 287 |
uint16_t dst; |
test/periphery-lld/bq27500_v1_bq241xx_v1/aos_test_bq27500_bq241xx.c | ||
---|---|---|
52 | 52 |
|
53 | 53 |
// local variables |
54 | 54 |
aos_testresult_t result = {0, 0}; |
55 |
uint32_t status;
|
|
55 |
int32_t status; |
|
56 | 56 |
uint16_t dst; |
57 | 57 |
bq27500_lld_flags_t flags; |
58 | 58 |
bq27500_lld_batgood_t bg; |
test/periphery-lld/button_v1/aos_test_button.c | ||
---|---|---|
63 | 63 |
|
64 | 64 |
// local variables |
65 | 65 |
aos_testresult_t result = {0, 0}; |
66 |
int32_t status = AOS_OK;
|
|
66 |
int32_t status; |
|
67 | 67 |
unsigned int count = 0; |
68 | 68 |
button_lld_state_t bstate; |
69 | 69 |
event_listener_t evtlistener; |
... | ... | |
71 | 71 |
|
72 | 72 |
chprintf(stream, "test interrupts for ten seconds...\n"); |
73 | 73 |
chEvtRegister(((aos_test_buttondata_t*)test->data)->evtsource, &evtlistener, INTERRUPT_EVENT_ID); |
74 |
status = APAL_STATUS_OK; |
|
74 | 75 |
aosSysGetUptime(&tend); |
75 | 76 |
tend += 10 * MICROSECONDS_PER_SECOND; |
76 | 77 |
do { |
Also available in: Unified diff