closeport.c 771 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. *====================================================================*/
  8. /*====================================================================*
  9. *
  10. * void closeport (struct _file_ * port);
  11. *
  12. * serial.h
  13. *
  14. * close a serial port;
  15. *
  16. * Contributor(s):
  17. * Charles Maier <cmaier@qca.qualcomm.com>
  18. *
  19. *--------------------------------------------------------------------*/
  20. #ifndef CLOSEPORT_SOURCE
  21. #define CLOSEPORT_SOURCE
  22. #include <unistd.h>
  23. #include <stdlib.h>
  24. #include "../tools/types.h"
  25. #include "../serial/serial.h"
  26. void closeport (struct _file_ * port)
  27. {
  28. close (port->file);
  29. return;
  30. }
  31. #endif