efi::size

This commit is contained in:
rusefillc 2022-10-27 20:32:35 -04:00
parent f6d2c49255
commit b75f899973
4 changed files with 7 additions and 6 deletions

View File

@ -5,6 +5,7 @@
#include "gm_ls_4.h" #include "gm_ls_4.h"
#include "defaults.h" #include "defaults.h"
#include <rusefi/arrays.h>
void setGmLs4() { void setGmLs4() {
engineConfiguration->globalTriggerAngleOffset = 86; engineConfiguration->globalTriggerAngleOffset = 86;

View File

@ -146,7 +146,7 @@ static ADCConversionGroup adcgrpcfgFast = {
#endif /* ADC_MAX_CHANNELS_COUNT */ #endif /* ADC_MAX_CHANNELS_COUNT */
}; };
AdcDevice fastAdc(&adcgrpcfgFast, fastAdcSampleBuf, ARRAY_SIZE(fastAdcSampleBuf)); AdcDevice fastAdc(&adcgrpcfgFast, fastAdcSampleBuf, efi::size(fastAdcSampleBuf));
static void fast_adc_callback(GPTDriver*) { static void fast_adc_callback(GPTDriver*) {
#if EFI_INTERNAL_ADC #if EFI_INTERNAL_ADC

View File

@ -400,7 +400,7 @@ int L9779::update_output()
CMD_CONTR_REG(2, regs[2]), CMD_CONTR_REG(2, regs[2]),
CMD_CONTR_REG(3, regs[3]) CMD_CONTR_REG(3, regs[3])
}; };
ret = spi_rw_array(tx, NULL, ARRAY_SIZE(tx)); ret = spi_rw_array(tx, NULL, efi::size(tx));
if (ret == 0) { if (ret == 0) {
/* atomic */ /* atomic */

View File

@ -483,7 +483,7 @@ int Tle8888::update_output()
CMD_CMD0((mr_manual ? REG_CMD0_MRSE : 0x0) | CMD_CMD0((mr_manual ? REG_CMD0_MRSE : 0x0) |
((o_data & BIT(TLE8888_OUTPUT_MR)) ? REG_CMD0_MRON : 0x0)) ((o_data & BIT(TLE8888_OUTPUT_MR)) ? REG_CMD0_MRON : 0x0))
}; };
ret = spi_rw_array(tx, NULL, ARRAY_SIZE(tx)); ret = spi_rw_array(tx, NULL, efi::size(tx));
if (ret == 0) { if (ret == 0) {
/* atomic */ /* atomic */
@ -514,9 +514,9 @@ int Tle8888::update_status_and_diag()
CMD_OPSTAT(1), CMD_OPSTAT(1),
CMD_OPSTAT(1) CMD_OPSTAT(1)
}; };
uint16_t rx[ARRAY_SIZE(tx)]; uint16_t rx[efi::size(tx)];
ret = spi_rw_array(tx, rx, ARRAY_SIZE(tx)); ret = spi_rw_array(tx, rx, efi::size(tx));
if (ret == 0) { if (ret == 0) {
/* the address and content of the selected register is transmitted with the /* the address and content of the selected register is transmitted with the
@ -695,7 +695,7 @@ int Tle8888::chip_init()
CMD_OE_SET CMD_OE_SET
}; };
ret = spi_rw_array(tx, NULL, ARRAY_SIZE(tx)); ret = spi_rw_array(tx, NULL, efi::size(tx));
if (ret == 0) { if (ret == 0) {
/* enable pins */ /* enable pins */