>
#include <alp/types.h>
Go to the source code of this file.
Data Structures | |
| struct | _AlpHwEffectsNote |
Stock Vibration/LED Patterns | |
| These constants can be used as the url arguments to alp_hweffects_play() and alp_hweffects_play_for_duration(), to specify a system-defined pattern. | |
| #define | ALP_HWEFFECTS_ALARM_ALERT ALP_HWEFFECTS_STOCK_PREFIX "alarm" |
| #define | ALP_HWEFFECTS_CONFIRM_TOUCH ALP_HWEFFECTS_STOCK_PREFIX "confirm" |
| #define | ALP_HWEFFECTS_CONNECT_ALERT ALP_HWEFFECTS_STOCK_PREFIX "connect" |
| #define | ALP_HWEFFECTS_DIALPAD_TOUCH ALP_HWEFFECTS_STOCK_PREFIX "dialpad" |
| #define | ALP_HWEFFECTS_DISCONNECT_ALERT ALP_HWEFFECTS_STOCK_PREFIX "disconnect" |
| #define | ALP_HWEFFECTS_GENERIC_ALERT ALP_HWEFFECTS_STOCK_PREFIX "etc" |
| #define | ALP_HWEFFECTS_INCOMING_ALERT ALP_HWEFFECTS_STOCK_PREFIX "incoming" |
| #define | ALP_HWEFFECTS_MESSAGE_ALERT ALP_HWEFFECTS_STOCK_PREFIX "message" |
| #define | ALP_HWEFFECTS_NORMAL_TOUCH ALP_HWEFFECTS_STOCK_PREFIX "normal" |
| #define | ALP_HWEFFECTS_POPUP_ALERT ALP_HWEFFECTS_STOCK_PREFIX "popup" |
| #define | ALP_HWEFFECTS_POWER_OFF_ALERT ALP_HWEFFECTS_STOCK_PREFIX "power_off" |
| #define | ALP_HWEFFECTS_POWER_ON_ALERT ALP_HWEFFECTS_STOCK_PREFIX "power_on" |
| #define | ALP_HWEFFECTS_SCROLL_RELEASE ALP_HWEFFECTS_STOCK_PREFIX "scroll_end" |
| #define | ALP_HWEFFECTS_SCROLL_TOUCH ALP_HWEFFECTS_STOCK_PREFIX "scroll" |
| #define | ALP_HWEFFECTS_SOFT_KEYPAD_RELEASE ALP_HWEFFECTS_STOCK_PREFIX "keypad_release" |
| #define | ALP_HWEFFECTS_SOFT_KEYPAD_TOUCH ALP_HWEFFECTS_STOCK_PREFIX "soft_keypad" |
| #define | ALP_HWEFFECTS_SOLID_PATTERN ALP_HWEFFECTS_STOCK_PREFIX "solid" |
| #define | ALP_HWEFFECTS_STOCK_PREFIX "stock:effect/" |
| #define | ALP_HWEFFECTS_SYSTEM_ALERT ALP_HWEFFECTS_STOCK_PREFIX "system" |
Hardware Device Names | |
| These constants can be used as the name arguments to alp_power_set_default_timeout() and alp_power_set_brightness(), to specify the backlight device(s) to which the new timeout/brightness setting should be applied. | |
| #define | ALP_HWEFFECTS_ATTN_LED "_attn-led" |
| LED(s) used to get user's attention. | |
| #define | ALP_HWEFFECTS_POWER_LED "_power-led" |
| LED(s) used to report power status. | |
| #define | ALP_HWEFFECTS_VIBRATOR "_vibrator" |
| Vibrator. | |
"Song" APIs | |
| These APIs are used to compose and play "songs" (series of notes) on a device's LEDs and/or vibrator. | |
| #define | ALP_HWEFFECTS_COLOR_FADE(r1, g1, b1, r2, g2, b2, totalBeats) |
| #define | ALP_HWEFFECTS_COLOR_FLASH(r, g, b, pattern, numSlots) |
| Macro for formatting notes. | |
| #define | ALP_HWEFFECTS_COLOR_NOTE(r, g, b, beats) |
| Macro for formatting notes for color LEDs. | |
| #define | ALP_HWEFFECTS_DEFAULT_TEMPO 100 |
| Default tempo is 100ms per beat (10 beats per second). | |
| #define | ALP_HWEFFECTS_FADE(intensity1, intensity2, totalBeats) |
| #define | ALP_HWEFFECTS_FLASH(intensity, pattern, numSlots) ALP_HWEFFECTS_COLOR_FLASH(intensity, intensity, intensity, pattern, numSlots) |
| #define | ALP_HWEFFECTS_NOTE(intensity, beats) ALP_HWEFFECTS_COLOR_NOTE(intensity, intensity, intensity, beats) |
| Macro for formatting notes for LEDs and/or vibrator. | |
| #define | ALP_HWEFFECTS_REST(beats) ALP_HWEFFECTS_NOTE(0, beats) |
| Macro for formatting notes. | |
| typedef _AlpHwEffectsNote | AlpHwEffectsNote |
| Structure used to store a single note. | |
| typedef _AlpHwEffectsSong | AlpHwEffectsSong |
| Data type used to store a song. | |
| enum | { ALP_HWEFFECTS_NOTE_SIMPLE, ALP_HWEFFECTS_NOTE_FLASH, ALP_HWEFFECTS_NOTE_FADE } |
| alp_status_t | alp_hweffects_play (const char *device, const char *url, int playCount) |
| Play a stored vibration/LED pattern. | |
| alp_status_t | alp_hweffects_play_for_duration (const char *device, const char *url, int playMillis) |
| Play a stored vibration/LED pattern for the specified duration, repeating as necessary. | |
| alp_status_t | alp_hweffects_song_add_notes (AlpHwEffectsSong *song, const AlpHwEffectsNote notes[], int noteCount) |
| Add a string of notes to a song. | |
| AlpHwEffectsSong * | alp_hweffects_song_create () |
| Create a new song. | |
| void | alp_hweffects_song_destroy (AlpHwEffectsSong *song) |
| Destroy a song. | |
| int | alp_hweffects_song_get_duration (const AlpHwEffectsSong *song) |
| Retrieve song's duration, in beats. | |
| int | alp_hweffects_song_get_repeat (const AlpHwEffectsSong *song) |
| Retrieve song's internal repeat value. | |
| int | alp_hweffects_song_get_tempo (const AlpHwEffectsSong *song) |
| Retrieve song's beat duration. | |
| alp_status_t | alp_hweffects_song_play (const char *device, const AlpHwEffectsSong *song, int playCount) |
| Play a song. | |
| alp_status_t | alp_hweffects_song_play_for_duration (const char *device, const AlpHwEffectsSong *song, int playMillis) |
| Play a song for the specified duration, repeating as necessary. | |
| alp_status_t | alp_hweffects_song_set_repeat (AlpHwEffectsSong *song, int repeatCount) |
| Set song's internal repeat value. | |
| alp_status_t | alp_hweffects_song_set_tempo (AlpHwEffectsSong *song, int millisPerBeat) |
| Sets a song's beat duration. | |
| alp_status_t | alp_hweffects_stop (void) |
| Stop a vibration/LED pattern which is currently playing. | |
| alp_status_t | alp_hweffects_vibrate (int millis) |
| Utility function for pulsing device's vibrator. | |
Hardware Effects Error Codes | |
| #define | ALP_STATUS_HWEFFECTS_BAD_FORMAT (ALP_CLASS_HWEFFECTS | 0x00060000) |
| Invalid value in note data field. | |
| #define | ALP_STATUS_HWEFFECTS_DEVICE_BUSY (ALP_CLASS_HWEFFECTS | 0x00070000) |
| Song already playing on requested device. | |
| #define | ALP_STATUS_HWEFFECTS_INVALID_PARAM (ALP_CLASS_HWEFFECTS | 0x00010000) |
| Invalid parameter value. | |
| #define | ALP_STATUS_HWEFFECTS_NO_DEVICE (ALP_CLASS_HWEFFECTS | 0x00050000) |
| Specified device doesn't exist. | |
| #define | ALP_STATUS_HWEFFECTS_NO_FREE_RAM (ALP_CLASS_HWEFFECTS | 0x00020000) |
| Memory allocation failed. | |
| #define | ALP_STATUS_HWEFFECTS_NO_SERVER (ALP_CLASS_HWEFFECTS | 0x00030000) |
| Can't connect to HWeffects server. | |
| #define | ALP_STATUS_HWEFFECTS_NOT_ALLOWED (ALP_CLASS_HWEFFECTS | 0x00040000) |
| Operation not allowed. | |
| #define | ALP_STATUS_HWEFFECTS_NOT_PLAYING (ALP_CLASS_HWEFFECTS | 0x00080000) |
| Song not currently playing. | |
Defines | |
| #define | ALP_HWEFFECTS_H_ 1 |
|
|
|
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.