~phablet-team/libiphb/master

« back to all changes in this revision

Viewing changes to src/iphb_internal.h

  • Committer: Simo Piiroinen
  • Date: 2014-03-24 09:19:48 UTC
  • mfrom: (35.1.3)
  • Revision ID: git-v1:4c532acaf7243b9fa952aeaf7c1f0dce1d77f3b3
Merge pull request #7 from spiiroin/32bit_iphb_ranges

Support 32bit iphb wakeup ranges

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#define IPHB_INTERNAL_H
30
30
 
31
31
#include <sys/types.h>
 
32
#include <stdint.h>
32
33
 
33
34
#define HB_SOCKET_PATH          "/dev/shm/iphb"     /**@brief IPC path between client and iphbd */
34
35
#define HB_KERNEL_DEVICE        "/dev/iphb"         /**@brief Device between kernel module and iphbd */
44
45
 
45
46
/**@brief Message from client to iphbd ("wake me up") */
46
47
struct _iphb_wait_req_t {
47
 
  unsigned short mintime;       /*!< minimum wait time in seconds, zero means use default */
48
 
  unsigned short maxtime;       /*!< maximum wait time in seconds, zero means use default */
49
 
  pid_t          pid;           /*!< client process ID (PID) */
 
48
  uint16_t mintime;     /*!< minimum wait time in seconds, zero means use default */
 
49
  uint16_t maxtime;     /*!< maximum wait time in seconds, zero means use default */
 
50
  pid_t    pid;         /*!< client process ID (PID) */
 
51
  // sizeof = 8
50
52
 
51
53
  /* Since 1.1.0 */
52
 
  unsigned char  wakeup;        /*!< Flag for use with dsme internal waits.
53
 
                                 *   If set to non-zero value, device will
54
 
                                 *   wakeup to handle the internal wakeup
55
 
                                 *   instead of handling it while woken up
56
 
                                 *   due to external activity. */
 
54
  uint8_t wakeup;       /*!< Flag for use with dsme internal waits.
 
55
                         *   If set to non-zero value, device will
 
56
                         *   wakeup to handle the internal wakeup
 
57
                         *   instead of handling it while woken up
 
58
                         *   due to external activity. */
 
59
  // sizeof = 9
 
60
 
 
61
 
 
62
  /* Since 1.2.0 */
 
63
  uint8_t version;      /*!< Request structure version:
 
64
                         *   0 <  1.2.0
 
65
                         *   1 >= 1.2.0
 
66
                         */
 
67
  uint16_t mintime_hi;  /*!< Extend minimum wait time to 32bit range */
 
68
  uint16_t maxtime_hi;  /*!< Extend maximum wait time to 32bit range */
 
69
  // sizeof = 14
57
70
 
58
71
  /* Note: The size of this structure can grow up to 64 bytes without causing
59
72
   *       binary compatibility breaks, see struct _iphb_req_t below */