1
0
Fork 0

2020 February 29 Breaking Changes Update (#8064)

This commit is contained in:
James Young 2020-02-29 12:00:00 -08:00
parent 85041ff05b
commit 26eef35f07
No known key found for this signature in database
GPG key ID: 06FAA77B63D48E80
362 changed files with 27772 additions and 8810 deletions

View file

@ -110,26 +110,26 @@ uint8_t pwm_register_array[9] = {0};
msg_t is31_select_page(uint8_t page) {
tx[0] = IS31_COMMANDREGISTER;
tx[1] = page;
return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, US2ST(IS31_TIMEOUT));
return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, TIME_US2I(IS31_TIMEOUT));
}
msg_t is31_write_data(uint8_t page, uint8_t *buffer, uint8_t size) {
is31_select_page(page);
return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, buffer, size, NULL, 0, US2ST(IS31_TIMEOUT));
return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, buffer, size, NULL, 0, TIME_US2I(IS31_TIMEOUT));
}
msg_t is31_write_register(uint8_t page, uint8_t reg, uint8_t data) {
is31_select_page(page);
tx[0] = reg;
tx[1] = data;
return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, US2ST(IS31_TIMEOUT));
return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 2, NULL, 0, TIME_US2I(IS31_TIMEOUT));
}
msg_t is31_read_register(uint8_t page, uint8_t reg, uint8_t *result) {
is31_select_page(page);
tx[0] = reg;
return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 1, result, 1, US2ST(IS31_TIMEOUT));
return i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, tx, 1, result, 1, TIME_US2I(IS31_TIMEOUT));
}
/* ========================
@ -194,7 +194,7 @@ static THD_FUNCTION(LEDthread, arg) {
// wait for a message (asynchronous)
// (messages are queued (up to LED_MAILBOX_NUM_MSGS) if they can't
// be processed right away
chMBFetch(&led_mailbox, &msg, TIME_INFINITE);
chMBFetchTimeout(&led_mailbox, &msg, TIME_INFINITE);
msg_type = msg & 0xFF; //first byte is action information
msg_args[0] = (msg >> 8) & 0xFF;
msg_args[1] = (msg >> 16) & 0XFF;