Skip to content
Snippets Groups Projects
  • danpetry's avatar
    cd449e38
    cpu/cc2538: Adapted UART driver incl. board config · cd449e38
    danpetry authored
    Changed the style of the UART configuration for different boards,
    from a define based configuration to one based on an array of
    structs, one struct for each UART, with the format of the struct defined
    in cc2538/include/periph_cpu.h.
    
      - Defined the fields of the struct in periph_cpu.h
      - Removed the compilation includes that were in uart.c for each UART
      - Implemented a generic ISR subroutine for clarity
      - combined uart_base and uart_init in uart.c
      - used bitmask for the interrupt setup
      - took the uart Rx, Tx, and IRQ numbers out of the config
      (as this has to match the .dev field). Replaced with
      macros from the uart number
      - took out some unused code
      - implemented power on/off commands
      - removed reset function - now bytes are just discarded on error
      - Rx now not initialised if Rx callback = NULL, as per
      drivers/periph/uart.h
      - device is now enabled after callbacks are set, not before
      - asserts raised if rts and cts are enabled for UART0
      - BIT macro removed
    cd449e38
    History
    cpu/cc2538: Adapted UART driver incl. board config
    danpetry authored
    Changed the style of the UART configuration for different boards,
    from a define based configuration to one based on an array of
    structs, one struct for each UART, with the format of the struct defined
    in cc2538/include/periph_cpu.h.
    
      - Defined the fields of the struct in periph_cpu.h
      - Removed the compilation includes that were in uart.c for each UART
      - Implemented a generic ISR subroutine for clarity
      - combined uart_base and uart_init in uart.c
      - used bitmask for the interrupt setup
      - took the uart Rx, Tx, and IRQ numbers out of the config
      (as this has to match the .dev field). Replaced with
      macros from the uart number
      - took out some unused code
      - implemented power on/off commands
      - removed reset function - now bytes are just discarded on error
      - Rx now not initialised if Rx callback = NULL, as per
      drivers/periph/uart.h
      - device is now enabled after callbacks are set, not before
      - asserts raised if rts and cts are enabled for UART0
      - BIT macro removed