ftsTime.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * FTS Capacitive touch screen controller (FingerTipS)
  4. *
  5. * Copyright (C) 2016-2019, STMicroelectronics Limited.
  6. * Authors: AMG(Analog Mems Group) <[email protected]>
  7. *
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License version 2 as published by
  11. * the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful, but WITHOUT
  14. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  16. * more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along with
  19. * this program. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. /**
  22. *
  23. **************************************************************************
  24. ** STMicroelectronics **
  25. **************************************************************************
  26. ** [email protected] **
  27. **************************************************************************
  28. * *
  29. * FTS Utility for mesuring/handling the time *
  30. * *
  31. **************************************************************************
  32. **************************************************************************
  33. *
  34. */
  35. #ifndef __FTS_TIME_H
  36. #define __FTS_TIME_H
  37. #include <linux/time.h>
  38. #include "ftsCrossCompile.h"
  39. struct StopWatch {
  40. struct timespec64 start, end;
  41. };
  42. void startStopWatch(struct StopWatch *w);
  43. void stopStopWatch(struct StopWatch *w);
  44. int elapsedMillisecond(struct StopWatch *w);
  45. int elapsedNanosecond(struct StopWatch *w);
  46. char *timestamp(void);
  47. void stdelay(unsigned long ms);
  48. #endif