4 * Copyright 2004 Develer S.r.l. (http://www.develer.com/)
5 * Copyright 2004 Giovanni Bajo
9 * \brief Generic library to handle buzzers and leds
13 * \author Giovanni Bajo <rasky@develer.com>
18 * Revision 1.1 2004/05/23 18:36:05 bernie
19 * Import buzzerled driver.
23 #ifndef DRV_BUZZERLED_H
24 #define DRV_BUZZERLED_H
26 /*! Include hw.h. We expect hw.h to define enum BLD_DEVICE, which must contain
27 * an enumarator for each device, plus a special symbol NUM_BLDS containing the
32 /*! Initialize the buzzerled library.
34 * \note This function must be called before any other function in the library.
38 /*! Set or reset a device.
40 * \param device Device to be set
41 * \param enable Enable/disable status
43 void bld_set(enum BLD_DEVICE device, bool enable);
45 /*! Enable a device for a certain interval of time
47 * \param device Device to be enabled
48 * \param duration Number of milliseconds the device must be enabled
50 * \note This function is non-blocking, so it will return immediately.
52 void bld_beep(enum BLD_DEVICE device, uint16_t duration);
55 /*! Enable a device for a certain interval of time and wait.
57 * \param device Device to be enabled
58 * \param duration Number of milliseconds the device must be enabled
60 * \note This function is blocking, so it will return after the specified period of time.
62 void bld_beep_and_wait(enum BLD_DEVICE device, uint16_t duration);
64 #endif /* DRV_BUZZERLED_H */