MCPcopy Create free account
hub / github.com/PricelessToolkit/MailBoxGuard / setOCP

Method setOCP

Code/Arduino_libraries/LoRa/LoRa.cpp:607–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607void LoRaClass::setOCP(uint8_t mA)
608{
609 uint8_t ocpTrim = 27;
610
611 if (mA <= 120) {
612 ocpTrim = (mA - 45) / 5;
613 } else if (mA <=240) {
614 ocpTrim = (mA + 30) / 10;
615 }
616
617 writeRegister(REG_OCP, 0x20 | (0x1F & ocpTrim));
618}
619
620void LoRaClass::setGain(uint8_t gain)
621{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected