The UART has a receive buffer which will fill up when it receives bytes.
Once the buffer is full, it raises the RX flag until the value is read
by the cpu.
Currently an interrupt is triggered any time there is any activity on
the UART_RXD line, but later it will only trigger once there is data
ready to be read.
Upon receiving an interrupt, the corresponding bit in the interrupt
status register will be set and an IRQ will be raised for the CPU. The
cpu can then respond to the interrupt and clear the interrupt by writing
back to the interrupt status register.
The write task will transmit a single byte, the puts task will transmit
a string of length n. These do not do any verification, you still have
to look at the output.
Added new signal tx_flag, which indicates whether the transmitter is
ready for new data.
Added status register, which when read will return the tx_flag bit, as
well as others that can be implemented.
Added new state IDLE, which resets the TX flag and allows new data to be
written.
Added code to allow for different baud rates, though it is still fixed
currently.
Fixed bug where we forgot to restore x in _hex_set_8 if the idx check
fails. We did remember to restore it if the check passed.
Fixed bug where _hex_set_24 did not return 0.
This only includes the method to set the pairs of displays individually.
The functions to write a single 16 or 32 bit value have not been
implemented yet, nor has the mask function.
This also increases the number of registers to 4, one more for the high
pair of displays, and a final one for a mask register which has not been
implemented yet.
Adds the usb code that we got in ECE 385. It will not work now, and
parts that involve the timer are disabled. It does compile though, with
a few warnings.
The goal will be to add USB MSD support, which is not actually given to
us so I will have to do myself or find some other code to base it off
of.
Since the goal is to have the MAX3421E working, which uses multiple 8
bit transfers, we should support multiple 8 bit transfers instead of
trying to use 16 bit transfers.
When using spi_byte(), the device is automatically selected. After you
have made as many transfers as you want, you must deselect the device
with spi_deselect().
the SPI module reads and writes at the same time. If you don't want to
write a value, then write all zeros or whatever the device you are
communicating with wants.