]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commitdiff
Document rpp/gio.h
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 26 Aug 2015 06:09:34 +0000 (08:09 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 28 Aug 2015 14:17:01 +0000 (16:17 +0200)
rpp/include/rpp/gio.h

index a5edd60acc0232a9f1088d9b4fe4751bd34dfd64..0ffc8426847abb7b6aafcc00494a5cd886fc7d50 100644 (file)
 #define RPP_GIO_PORT_NHET1  0x8
 #define RPP_GIO_PORT_ALL    (RPP_GIO_PORT_GIOA|RPP_GIO_PORT_GIOB|RPP_GIO_PORT_NHET1)
 
+/**
+ * Intialize GIO ports.
+ *
+ * The ports are initialized according to the definition in gio_def.h.
+ *
+ * @param[in] init_ports Specifies which ports to initialize.
+ * RPP_GIO_PORT_ALL causes all ports to be initialized.
+ *
+ * @return SUCCESS if successful, FAILURE otherwise.
+ */
 int8_t rpp_gio_init(uint32_t init_ports);
 
+/**
+ * Sets GIO output pin to a value.
+ *
+ * @param pin Pin to set
+ * @param value Value to the pin to.
+ *
+ * @return SUCCESS if successful, FAILURE otherwise.
+ */
 int8_t rpp_gio_set(enum pin_name pin, boolean_t value);
+
+/**
+ * Reads the value of a GIO pin.
+ *
+ * @param pin Pin to read.
+ *
+ * @return Pin value (0 or 1) in case of success, FAILURE otherwise.
+ */
 int8_t rpp_gio_get(enum pin_name pin);
 
 /** GIO pin input mode */
@@ -42,7 +68,7 @@ enum rpp_gio_io {
 };
 
 /**
- * Configure GIO pin
+ * Configure GIO pin.
  *
  * @param pin Pin to configure
  * @param io Configure the pin as input or output.