Fan Yang c1b22ede30
Add BSP for HPM6750EVK and HPM6750EVKMINI (#6374)
* Add CANFD support and correct typos

- Added CANFD required fields to can.h
- Fixed typos in can.h and can.c
- Corrected all the projects affected by the typo
- Fixed wrong line-ending in some affected can driver files

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>

* update

* bsp: support boards from hpmicro

- Supported HPM6750EVKMINI
- Supported HPM6750EVK

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>
Co-authored-by: Meco Man <920369182@qq.com>
2022-09-06 00:48:16 -04:00

23 lines
316 B
C

/*
* Copyright (c) 2021 hpmicro
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#include "hpm_common.h"
int __ffssi2(int x)
{
int i = 0;
if (!x) {
return 0;
}
for (i = 0; (i < sizeof(x) * 8 - 1); i++) {
if ((x >> i) & 1) {
break;
}
}
return i + 1;
}