Blame view

RIOT/examples/riot_and_cpp/c_functions.h 920 Bytes
a752c7ab   elopes   add first test an...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  /*
   * Copyright (C) 2014 Ho Chi Minh city University of Technology (HCMUT)
   *
   * This file is subject to the terms and conditions of the GNU Lesser
   * General Public License v2.1. See the file LICENSE in the top level
   * directory for more details.
   */
  
  /**
   * @ingroup     examples
   * @{
   *
   * @file
   * @brief       Definitions for some c functions.
   *
   * @author      DangNhat Pham-Huu <51002279@hcmut.edu.vn>
   *
   */
  
  #include <stdio.h>
  
  #ifndef C_FUNCTIONS_H
  #define C_FUNCTIONS_H
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  /**
   * @brief   Print a hello message.
   */
  int hello(void);
  
  /**
   * @brief   Get day of week from given date (day, month, year >= 1/1/2000).
   *
   * @param[in]   day
   * @param[in]   month
   * @param[in]   year
   *
   * @return      day of week (0 means Sunday, ... 6 means Saturday)
   */
  int day_of_week(int day, int month, int year);
  
  #ifdef __cplusplus
  }
  #endif
  
  /** @} */
  #endif /* C_FUNCTIONS_H */