cjohnweb 14 User Title? What's that?

Hi there!

I've googled around, and can't seem to find an answer to this question: How do you check if UART# has already been enabled or not? And what I mean is, I need to be able to get into python and say "If uart1 is not enabled, enable it".

Here is the code to enable UART1 with Python on the BeagleBone Black Rev. C running Debian:

#!/usr/bin/python

# Enable UART1 so I can talk RS485 later

import Adafruit_BBIO.UART as UART

UART.setup("UART1")

exit()

This works fine, I run it, then I can run my serial communication scripts and all is gravy.

Since this is something I have to do for work, if there is no easy way to check if UART1 is enabled I will have other questions, such as....

If I repetetively run the "UART.setup("UART1")" code:
* Will that cause problems for UART1 ?
* Will this interupt any other serial communications that are happening simultaniously?
* Will this create any kind of system over head, like loading unnecesary stuff into memory that I can't getout?

Maybe there is a good resource I can read and get the answers I am looking for. I just can't seem to find anything via Google. Thank you!