Sha256: d145bb5327de851b9dbc6a31e318a8469aa6eb0b350b3379e53a71146b060f47
Contents?: true
Size: 411 Bytes
Versions: 54
Compression:
Stored size: 411 Bytes
Contents
#include "Types.h" #include "UsartBaudRateRegisterCalculator.h" uint8 UsartModel_CalculateBaudRateRegisterSetting(uint32 masterClock, uint32 baudRate) { uint32 registerSetting = ((masterClock * 10) / (baudRate * 16)); if ((registerSetting % 10) >= 5) { registerSetting = (registerSetting / 10) + 1; } else { registerSetting /= 10; } return (uint8)registerSetting; }
Version data entries
54 entries across 39 versions & 1 rubygems