2017-05-03 12:14:36 -06:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
|
|
# Author: Jon Trulson <jtrulson@ics.com>
|
|
|
|
|
# Copyright (c) 2017 Intel Corporation.
|
|
|
|
|
#
|
2019-05-09 09:47:11 -07:00
|
|
|
# SPDX-License-Identifier: MIT
|
2017-05-03 12:14:36 -06:00
|
|
|
|
|
|
|
|
import mraa as m
|
|
|
|
|
import unittest as u
|
|
|
|
|
|
|
|
|
|
from uart_checks_shared import *
|
|
|
|
|
|
|
|
|
|
class UartChecksSendbreak(u.TestCase):
|
|
|
|
|
def setUp(self):
|
|
|
|
|
self.uart = m.Uart(MRAA_UART_DEV_NUM)
|
|
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
|
del self.uart
|
|
|
|
|
|
|
|
|
|
def test_uart_sendbreak(self):
|
|
|
|
|
self.assertEqual(self.uart.sendBreak(0),
|
|
|
|
|
m.SUCCESS,
|
|
|
|
|
"Running UART sendBreak() did not return success")
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
u.main()
|