0bd93292b3
- Updated hpm_sdk in libraries - Updated rt-thread driver adapter - Updated bsp for hpm6750evkmini - Updated bsp for hpm6750evk - Added bsp for hpm6750evk2 - Added bsp for hpm6300evk - Added bsp for hpm6200evk Signed-off-by: Fan YANG <fan.yang@hpmicro.com>
23 lines
316 B
C
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;
|
|
}
|