<?php

function getParityBitsName( $intParityBits ) {

    foreach( \App\Models\ComSettingsModel::$s_arrstrParityBits as $intParityBitKey => $strParityBit ) {

        if( $intParityBits == $intParityBitKey ) {
            return $strParityBit;
        }
    }
}

function getStopBitsName( $intStopBits ) {

    for( $intCounterStopBits = 1; $intCounterStopBits <= 2; $intCounterStopBits++ ) { 

        if( $intStopBits == $intCounterStopBits ) {
            return $intCounterStopBits;
        }
    }
}

function getModesName( $intModes ) {

    foreach( \App\Models\ComSettingsModel::$s_arrstrModes as $intModesKey => $strMode ) {

        if( $intModes == $intModesKey ) {
            return $strMode;
        }
    }
}


