José Simões

Results 268 comments of José Simões

> Actually, the implementation of `HAL_Time_ExtendedCurrentSysTicks` is only applicable for ChibiOS, because it uses the `chVTGetSystemTimeX()` function directly. Yes, that's why I was suggesting to "just" rename it and make...

> @josesimoes So should I do that? Rename the function and remove the define? Yes, please!

> Another question: as the `CH_CFG_ST_FREQUENCY` is only used with 1kHz and 10kHz, there would be a much simpler implementation of the `HAL_Time_SysTicksToTime()` function. > For 1kHz it's only `sysTicks...

> I would suggest to replace the function HAL_Time_SysTicksToTime, which is pretty complicated with 2 multiplications and a one division, with the simpler implementation I mentioned before. I guess this...

@martin-kuhn for consistency, could you please remove the define of HAL_Time_CurrentSysTicks on the other platforms and replace it with a call to the appropriate function? If you're comfortable with that,...

> actually, it's not that simple. We are using a define-based implementation like that: > > static inline uint64_t HAL_Time_SysTicks1kHzToTime(uint64_t sysTicks) > { > #if defined(CH_CFG_ST_FREQUENCY) && (CH_CFG_ST_FREQUENCY == 1000)...

This is somewhat related with nanoframework/Home#112, that's been there for quite some time! Because it's being called constantly it needs to be coded as lightly as possible, otherwise it introduces...

@martin-kuhn to let you know that this is not forgotten. Just trying to organize things upwards to figure out the best way to have this change implemented.

Should be possible to delete comments as well.

Behavior confirmed. It's happening because the CLR is executing the IL `new` as if it was a class, which is incorrect because structs are value types.