X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=libserialport.h.in;h=7f6b9b9f10726503e1116de46ae3949417b01cc8;hb=7c8d67efdc711b9ba942a83153200d7185adf929;hp=8962ef8d942eb5fb6f368408b62feea9998a2a97;hpb=8c1a14e65805727ec63f4c908eb0f253a04a738b;p=libserialport.git diff --git a/libserialport.h.in b/libserialport.h.in index 8962ef8..7f6b9b9 100644 --- a/libserialport.h.in +++ b/libserialport.h.in @@ -59,7 +59,19 @@ * to restructure things somewhat, or do without some specialised features. * For particular notes on porting existing code, see @ref Porting. * - * The following subsections will help explain the principles of the API. + * Examples + * -------- + * + * Some simple example programs using libserialport are included in the + * @c examples directory in the source package: + * + * - @ref list_ports.c - Getting a list of ports present on the system. + * - @ref port_info.c - Getting information on a particular serial port. + * + * These examples are linked with the API documentation. Each function + * in the API reference includes links to where it is used in an example + * program, and each appearance of a function in the examples links + * to that function's entry in the API reference. * * Headers * ------- @@ -445,6 +457,8 @@ struct sp_event_set { * * Enumerating the serial ports of a system. * + * See @ref list_ports.c for a working example of port enumeration. + * * @{ */ @@ -534,6 +548,8 @@ void sp_free_port_list(struct sp_port **ports); * * Opening, closing and querying ports. * + * See @ref port_info.c for a working example of getting port information. + * * @{ */ @@ -1706,6 +1722,11 @@ const char *sp_get_lib_version_string(void); /** @} */ +/** + * @example list_ports.c Getting a list of ports present on the system. + * @example port_info.c Getting information on a particular serial port. +*/ + #ifdef __cplusplus } #endif