/* Sets the network to public or private. Updates the sync byte.  */
void RadioSetPublicNetwork(bool enable)
/* Sets the network to public or private. Updates the sync byte.  */
void RadioSetPublicNetwork(bool enable)
{
    RadioPublicNetwork.Current = RadioPublicNetwork.Previous = enable;
    RadioSetModem( MODEM_LORA );
    if( enable == true )
    {
        SX126xWriteRegister( REG_LR_SYNCWORD, ( LORA_MAC_PUBLIC_SYNCWORD >> 8 ) & 0xFF );
        SX126xWriteRegister( REG_LR_SYNCWORD + 1, LORA_MAC_PUBLIC_SYNCWORD & 0xFF );
    }
    else
    {
        SX126xWriteRegister( REG_LR_SYNCWORD, ( LORA_MAC_PRIVATE_SYNCWORD >> 8 ) & 0xFF );
        SX126xWriteRegister( REG_LR_SYNCWORD + 1, LORA_MAC_PRIVATE_SYNCWORD & 0xFF );
    }
}