# Path: pyb.py
# class ADC(object):
# class Pin(object):
#     def __init__(self, name):
#     def read(self):
#     def __str__(self):
#     def __init__(self, name):
#     def init(self, mode, pull):
#     def value(self, val=None):
#     def __str__(self):
#     IN = 'in'
#     OUT_PP = 'out_pp'
#     OUT_OD = 'out_od'
#     PULL_NONE = 'pull_none'
#     PULL_UP   = 'pull_up'
#     PULL_DOWN = 'pull_down'


import stm
from pyb import UART
"""This module implements the UART_Port class which talks to bioloid
devices using a UART on the pyboard.

"""


class UART_GPIO_Port:
    """Implements a port which can send or receive commands with a bioloid
    device using the pyboard UART class. This class assumes that there is
    an active HIGH GPIO line used to indicate transmitting (i.e. connected
    to something like an external 74AHCT1G126)
    """

    def __init__(self, uart_num, baud, control_pin, rx_buf_len=64):

# Path: pyb.py
# class ADC(object):
# class Pin(object):
#     def __init__(self, name):
#     def read(self):
#     def __str__(self):
#     def __init__(self, name):
#     def init(self, mode, pull):
#     def value(self, val=None):
#     def __str__(self):
#     IN = 'in'
#     OUT_PP = 'out_pp'
#     OUT_OD = 'out_od'
#     PULL_NONE = 'pull_none'
#     PULL_UP   = 'pull_up'
#     PULL_DOWN = 'pull_down'


# Path: bioloid/stm_uart_gpio_port.py
import stm
from pyb import UART

"""This module implements the UART_Port class which talks to bioloid
devices using a UART on the pyboard.

"""


class UART_GPIO_Port:
    """Implements a port which can send or receive commands with a bioloid
    device using the pyboard UART class. This class assumes that there is
    an active HIGH GPIO line used to indicate transmitting (i.e. connected
    to something like an external 74AHCT1G126)
    """

    def __init__(self, uart_num, baud, control_pin, rx_buf_len=64):

        self.uart = UART(uart_num)