# Path: bluezero/central.py
# class Central:
#     def __init__(self, device_addr, adapter_addr=None):
#     def available(adapter_address=None):
#     def add_characteristic(self, srv_uuid, chrc_uuid):
#     def load_gatt(self):
#     def services_available(self):
#     def services_resolved(self):
#     def connected(self):
#     def connect(self, profile=None, timeout=35):
#     def disconnect(self):
#     def run(self):
#     def quit(self):
# 
# Path: bluezero/tools.py
# def int_to_uint16(value_in):
# def sint16_to_int(byte_array):
# def bytes_to_xyz(byte_array):
# def int_to_uint32(value_in):
# def bitwise_or_2lists(list1, list2):
# def bitwise_and_2lists(list1, list2):
# def bitwise_xor_2lists(list1, list2):
# def url_to_advert(url, frame_type, tx_power):
# def get_fn_parameters(fn):
# def create_module_logger(module_name):
# 
# Path: bluezero/constants.py
# DBUS_OM_IFACE = 'org.freedesktop.DBus.ObjectManager'
# DBUS_PROP_IFACE = 'org.freedesktop.DBus.Properties'
# BLUEZ_SERVICE_NAME = 'org.bluez'
# ADAPTER_INTERFACE = 'org.bluez.Adapter1'
# DEVICE_INTERFACE = 'org.bluez.Device1'
# GATT_MANAGER_IFACE = 'org.bluez.GattManager1'
# GATT_PROFILE_IFACE = 'org.bluez.GattProfile1'
# GATT_SERVICE_IFACE = 'org.bluez.GattService1'
# GATT_CHRC_IFACE = 'org.bluez.GattCharacteristic1'
# GATT_DESC_IFACE = 'org.bluez.GattDescriptor1'
# LE_ADVERTISING_MANAGER_IFACE = 'org.bluez.LEAdvertisingManager1'
# LE_ADVERTISEMENT_IFACE = 'org.bluez.LEAdvertisement1'
# MEDIA_PLAYER_IFACE = 'org.bluez.MediaPlayer1'
# BLUEZERO_DBUS_NAME = 'ukBaz.bluezero'
# BLUEZERO_DBUS_OBJECT = '/ukBaz/bluezero'


from time import sleep
from bluezero import central
from bluezero import tools
from bluezero import constants
MAGNETO_BEARING = 'E95D9715-251D-470A-A062-FA1922DFA9A8'
MAGNETO_CALIBRATE = 'E95DB358-251D-470A-A062-FA1922DFA9A8'
IO_PIN_SRV = 'E95D127B-251D-470A-A062-FA1922DFA9A8'
IO_PIN_DATA = 'E95D8D00-251D-470A-A062-FA1922DFA9A8'
IO_AD_CONFIG = 'E95D5899-251D-470A-A062-FA1922DFA9A8'
IO_PIN_CONFIG = 'E95DB9FE-251D-470A-A062-FA1922DFA9A8'
IO_PIN_PWM = 'E95DD822-251D-470A-A062-FA1922DFA9A8'
TEMP_SRV = 'E95D6100-251D-470A-A062-FA1922DFA9A8'
TEMP_DATA = 'E95D9250-251D-470A-A062-FA1922DFA9A8'
TEMP_PERIOD = 'E95D1B25-251D-470A-A062-FA1922DFA9A8'
UART_SRV = '6E400001-B5A3-F393-E0A9-E50E24DCCA9E'
UART_TX = '6E400002-B5A3-F393-E0A9-E50E24DCCA9E'
UART_RX = '6E400003-B5A3-F393-E0A9-E50E24DCCA9E'

MICROBIT = {ACCEL_SRV: [ACCEL_DATA, ACCEL_PERIOD],
            BTN_SRV: [BTN_A_STATE, BTN_B_STATE],
            LED_SRV: [LED_STATE, LED_TEXT, LED_SCROLL],
            MAGNETO_SRV: [MAGNETO_DATA, MAGNETO_PERIOD,
                          MAGNETO_BEARING, MAGNETO_CALIBRATE],
            IO_PIN_SRV: [IO_PIN_DATA, IO_AD_CONFIG, IO_PIN_CONFIG, IO_PIN_PWM],
            TEMP_SRV: [TEMP_DATA, TEMP_PERIOD],
            UART_SRV: [UART_TX, UART_RX]}
SERVICE_NAMES = {ACCEL_SRV: 'Accelerometer Service',
                 BTN_SRV: 'Button Service',
                 LED_SRV: 'LED Service',
                 MAGNETO_SRV: 'Magnetometer Service',
                 IO_PIN_SRV: 'IO Pin Service',
                 TEMP_SRV: 'Temperature Service',
                 UART_SRV: 'Nordic Semiconductor UART service',
                 }

# Path: bluezero/central.py
# class Central:
#     def __init__(self, device_addr, adapter_addr=None):
#     def available(adapter_address=None):
#     def add_characteristic(self, srv_uuid, chrc_uuid):
#     def load_gatt(self):
#     def services_available(self):
#     def services_resolved(self):
#     def connected(self):
#     def connect(self, profile=None, timeout=35):
#     def disconnect(self):
#     def run(self):
#     def quit(self):
# 
# Path: bluezero/tools.py
# def int_to_uint16(value_in):
# def sint16_to_int(byte_array):
# def bytes_to_xyz(byte_array):
# def int_to_uint32(value_in):
# def bitwise_or_2lists(list1, list2):
# def bitwise_and_2lists(list1, list2):
# def bitwise_xor_2lists(list1, list2):
# def url_to_advert(url, frame_type, tx_power):
# def get_fn_parameters(fn):
# def create_module_logger(module_name):
# 
# Path: bluezero/constants.py
# DBUS_OM_IFACE = 'org.freedesktop.DBus.ObjectManager'
# DBUS_PROP_IFACE = 'org.freedesktop.DBus.Properties'
# BLUEZ_SERVICE_NAME = 'org.bluez'
# ADAPTER_INTERFACE = 'org.bluez.Adapter1'
# DEVICE_INTERFACE = 'org.bluez.Device1'
# GATT_MANAGER_IFACE = 'org.bluez.GattManager1'
# GATT_PROFILE_IFACE = 'org.bluez.GattProfile1'
# GATT_SERVICE_IFACE = 'org.bluez.GattService1'
# GATT_CHRC_IFACE = 'org.bluez.GattCharacteristic1'
# GATT_DESC_IFACE = 'org.bluez.GattDescriptor1'
# LE_ADVERTISING_MANAGER_IFACE = 'org.bluez.LEAdvertisingManager1'
# LE_ADVERTISEMENT_IFACE = 'org.bluez.LEAdvertisement1'
# MEDIA_PLAYER_IFACE = 'org.bluez.MediaPlayer1'
# BLUEZERO_DBUS_NAME = 'ukBaz.bluezero'
# BLUEZERO_DBUS_OBJECT = '/ukBaz/bluezero'


# Path: bluezero/microbit.py
from time import sleep
from bluezero import central
from bluezero import tools
from bluezero import constants

MAGNETO_BEARING = 'E95D9715-251D-470A-A062-FA1922DFA9A8'
MAGNETO_CALIBRATE = 'E95DB358-251D-470A-A062-FA1922DFA9A8'
IO_PIN_SRV = 'E95D127B-251D-470A-A062-FA1922DFA9A8'
IO_PIN_DATA = 'E95D8D00-251D-470A-A062-FA1922DFA9A8'
IO_AD_CONFIG = 'E95D5899-251D-470A-A062-FA1922DFA9A8'
IO_PIN_CONFIG = 'E95DB9FE-251D-470A-A062-FA1922DFA9A8'
IO_PIN_PWM = 'E95DD822-251D-470A-A062-FA1922DFA9A8'
TEMP_SRV = 'E95D6100-251D-470A-A062-FA1922DFA9A8'
TEMP_DATA = 'E95D9250-251D-470A-A062-FA1922DFA9A8'
TEMP_PERIOD = 'E95D1B25-251D-470A-A062-FA1922DFA9A8'
UART_SRV = '6E400001-B5A3-F393-E0A9-E50E24DCCA9E'
UART_TX = '6E400002-B5A3-F393-E0A9-E50E24DCCA9E'
UART_RX = '6E400003-B5A3-F393-E0A9-E50E24DCCA9E'

MICROBIT = {ACCEL_SRV: [ACCEL_DATA, ACCEL_PERIOD],
            BTN_SRV: [BTN_A_STATE, BTN_B_STATE],
            LED_SRV: [LED_STATE, LED_TEXT, LED_SCROLL],
            MAGNETO_SRV: [MAGNETO_DATA, MAGNETO_PERIOD,
                          MAGNETO_BEARING, MAGNETO_CALIBRATE],
            IO_PIN_SRV: [IO_PIN_DATA, IO_AD_CONFIG, IO_PIN_CONFIG, IO_PIN_PWM],
            TEMP_SRV: [TEMP_DATA, TEMP_PERIOD],
            UART_SRV: [UART_TX, UART_RX]}
SERVICE_NAMES = {ACCEL_SRV: 'Accelerometer Service',
                 BTN_SRV: 'Button Service',
                 LED_SRV: 'LED Service',
                 MAGNETO_SRV: 'Magnetometer Service',
                 IO_PIN_SRV: 'IO Pin Service',
                 TEMP_SRV: 'Temperature Service',
                 UART_SRV: 'Nordic Semiconductor UART service',
                 }

logger = tools.create_module_logger(__name__)