Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add empty lines to improve readability
Tightly interleaved doxygen data and code made it unnecessarily
hard to browse the code.
  • Loading branch information
spiiroin committed May 26, 2014
1 parent 7cb69d6 commit 2f584eb
Show file tree
Hide file tree
Showing 19 changed files with 278 additions and 45 deletions.
6 changes: 6 additions & 0 deletions datapipe.h
Expand Up @@ -77,21 +77,27 @@ typedef enum {

/** Retrieve a gboolean from a datapipe */
#define datapipe_get_gbool(_datapipe) (GPOINTER_TO_INT((_datapipe).cached_data))

/** Retrieve a gint from a datapipe */
#define datapipe_get_gint(_datapipe) (GPOINTER_TO_INT((_datapipe).cached_data))

/** Retrieve a guint from a datapipe */
#define datapipe_get_guint(_datapipe) (GPOINTER_TO_UINT((_datapipe).cached_data))

/** Retrieve a gsize from a datapipe */
#define datapipe_get_gsize(_datapipe) (GPOINTER_TO_SIZE((_datapipe).cached_data))

/** Retrieve a gpointer from a datapipe */
#define datapipe_get_gpointer(_datapipe) ((_datapipe).cached_data)

/* Reference count */

/** Retrieve the filter reference count from a datapipe */
#define datapipe_get_filter_refcount(_datapipe) (g_slist_length((_datapipe).filters))

/** Retrieve the input trigger reference count from a datapipe */
#define datapipe_get_input_trigger_refcount(_datapipe) (g_slist_length((_datapipe).input_triggers))

/** Retrieve the output trigger reference count from a datapipe */
#define datapipe_get_output_trigger_refcount(_datapipe) (g_slist_length((_datapipe).output_triggers))

Expand Down
2 changes: 2 additions & 0 deletions event-input.h
Expand Up @@ -27,8 +27,10 @@

/** Path to the input device directory */
#define DEV_INPUT_PATH "/dev/input"

/** Prefix for event files */
#define EVENT_FILE_PREFIX "event"

/** Path to the GPIO key disable interface */
#define GPIO_KEY_DISABLE_PATH "/sys/devices/platform/gpio-keys/disabled_keys"

Expand Down
24 changes: 24 additions & 0 deletions event-switches.h
Expand Up @@ -25,47 +25,61 @@

/** Path to the SysFS interface for the lock flicker-key status */
#define MCE_FLICKER_KEY_STATE_PATH "/sys/devices/platform/gpio-switch/kb_lock/state"

/** Value for the lock flicker-key active state */
#define MCE_FLICKER_KEY_ACTIVE "closed"

/** Value for the lock flicker-key inactive state */
#define MCE_FLICKER_KEY_INACTIVE "open"

/** Path to the SysFS interface for the keyboard slide status */
#define MCE_KBD_SLIDE_STATE_PATH "/sys/devices/platform/gpio-switch/slide/state"

/** Value for the keyboard slide open state */
#define MCE_KBD_SLIDE_OPEN "open"

/** Value for the keyboard slide closed state */
#define MCE_KBD_SLIDE_CLOSED "closed"

/** Path to the SysFS interface for the camera focus state */
#define MCE_CAM_FOCUS_STATE_PATH "/sys/devices/platform/gpio-switch/cam_focus/state"

/** Value for the camera focus active state */
#define MCE_CAM_FOCUS_ACTIVE "active"

/** Value for the camera focus inactive state */
#define MCE_CAM_FOCUS_INACTIVE "inactive"

/** SysFS interface to enable/disable camera focus IRQs */
#define MCE_CAM_FOCUS_DISABLE_PATH "/sys/devices/platform/gpio-switch/cam_focus/disable"

/** Path to the SysFS interface for the camera launch state */
#define MCE_CAM_LAUNCH_STATE_PATH "/sys/devices/platform/gpio-switch/cam_launch/state"

/** Value for the camera launch active state */
#define MCE_CAM_LAUNCH_ACTIVE "active"

/** Value for the camera launch inactive state */
#define MCE_CAM_LAUNCH_INACTIVE "inactive"

/** Path to the SysFS interface for the lid cover status */
#define MCE_LID_COVER_STATE_PATH "/sys/devices/platform/gpio-switch/prot_shell/cover_switch"

/** Value for the lid cover open state */
#define MCE_LID_COVER_OPEN "open"

/** Value for the lid cover closed state */
#define MCE_LID_COVER_CLOSED "closed"

/** Path to the SysFS interface for the proximity sensor status */
#define MCE_PROXIMITY_SENSOR_STATE_PATH "/sys/devices/platform/gpio-switch/proximity/state"

/** Value for the proximity sensor open state */
#define MCE_PROXIMITY_SENSOR_OPEN "open"

/** Value for the proximity sensor closed state */
#define MCE_PROXIMITY_SENSOR_CLOSED "closed"

/** SysFS interface to enable/disable proximity sensor IRQs */
#define MCE_PROXIMITY_SENSOR_DISABLE_PATH "/sys/devices/platform/gpio-switch/proximity/disable"

Expand All @@ -74,36 +88,46 @@
* RX-51
*/
#define MCE_MUSB_OMAP3_USB_CABLE_STATE_PATH "/sys/class/i2c-adapter/i2c-1/1-0048/twl4030_usb/vbus"

/** Value for the MUSB HDRC USB cable connected state */
#define MCE_MUSB_OMAP3_USB_CABLE_CONNECTED "1"

/** Value for the MUSB HDRC USB cable disconnected state */
#define MCE_MUSB_OMAP3_USB_CABLE_DISCONNECTED "0"

/** Path to the SysFS interface for the RX-51 MMC0 cover status */
#define MCE_MMC0_COVER_STATE_PATH "/sys/class/mmc_host/mmc0/cover_switch"

/** Value for the RX-51 MMC0 cover open state */
#define MCE_MMC_COVER_OPEN "open"

/** Value for the RX-51 MMC0 cover closed state */
#define MCE_MMC_COVER_CLOSED "closed"

/** Path to the SysFS interface for the MMC cover status */
#define MCE_MMC_COVER_STATE_PATH "/sys/devices/platform/gpio-switch/mmci-omap.2/cover_switch"

/** Value for the MMC cover open state */
#define MCE_MMC_COVER_OPEN "open"

/** Value for the MMC cover closed state */
#define MCE_MMC_COVER_CLOSED "closed"

/** Path to the SysFS interface for the lens cover status */
#define MCE_LENS_COVER_STATE_PATH "/sys/devices/platform/gpio-switch/cam_shutter/state"

/** Value for the lens cover open state */
#define MCE_LENS_COVER_OPEN "open"

/** Value for the lens cover closed state */
#define MCE_LENS_COVER_CLOSED "closed"

/** Path to the SysFS interface for the battery cover status */
#define MCE_BATTERY_COVER_STATE_PATH "/sys/devices/platform/gpio-switch/bat_cover/cover_switch"

/** Value for the battery cover open state */
#define MCE_BATTERY_COVER_OPEN "open"

/** Value for the battery cover closed state */
#define MCE_BATTERY_COVER_CLOSED "closed"

Expand Down
1 change: 1 addition & 0 deletions mce-dsme.h
Expand Up @@ -43,6 +43,7 @@
* when in soft poweroff
*/
#define SOFTOFF_CHARGER_CONNECT_WAKEUP_STR "wakeup"

/**
* Name of configuration value for the "ignore charger" policy
* when in soft poweroff
Expand Down
4 changes: 4 additions & 0 deletions mce-log.h
Expand Up @@ -63,12 +63,16 @@ int mce_log_p_(const loglevel_t loglevel, const char *const file, const char *co
#else
/** Dummy version used when logging is disabled at compile time */
#define mce_log(_loglevel, _fmt, ...) do {} while (0)

/** Dummy version used when logging is disabled at compile time */
#define mce_log_set_verbosity(_verbosity) do {} while (0)

/** Dummy version used when logging is disabled at compile time */
#define mce_log_open(_name, _facility, _type) do {} while (0)

/** Dummy version used when logging is disabled at compile time */
#define mce_log_close() do {} while (0)

/** Dummy version used when logging is disabled at compile time */
#define mce_log_p(_loglevel) 0
#endif /* OSSOLOG_COMPILE */
Expand Down

0 comments on commit 2f584eb

Please sign in to comment.