uart_defines.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* uart_defines.h */
  2. /*
  3. This file is part of the ARM-Crypto-Lib.
  4. Copyright (C) 2010 Daniel Otte (daniel.otte@rub.de)
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef UART_DEFINES_H_
  17. #define UART_DEFINES_H_
  18. #define UART_0 0
  19. #define UART_1 1
  20. #define UART_2 2
  21. #define UART_MAX 2
  22. #define UART_DATABITS_5 0
  23. #define UART_DATABITS_6 1
  24. #define UART_DATABITS_7 2
  25. #define UART_DATABITS_8 3
  26. #define UART_PARATY_NONE 0
  27. #define UART_PARATY_EVEN 1
  28. #define UART_PARATY_ODD 2
  29. #define UART_PARATY_MARK 3
  30. #define UART_PARATY_SPACE 4
  31. #define UART_STOPBITS_ONE 0
  32. #define UART_STOPBITS_TWO 1
  33. #define UART_ERROR_OK 0
  34. #define UART_ERROR_WRONG_UART 1
  35. #define UART_ERROR_WRONG_DATABITS 2
  36. #define UART_ERROR_WRONG_PARATY 3
  37. #define UART_ERROR_WRONG_STOPBITS 4
  38. #define UART_ERROR_RX_BUFFER_INIT 5
  39. #define UART_ERROR_TX_BUFFER_INIT 6
  40. #endif /* UART_DEFINES_H_ */