[riot-notifications] [RIOT-OS/RIOT] Wiegand driver for RIOT-OS (#12217)

Mario Gómez notifications at github.com
Thu Sep 26 03:08:03 CEST 2019


mxgxw commented on this pull request.



> +   * @brief   Parameters needed for device initialization
+   */
+  typedef struct {
+    gpio_t       d0;      /**< Wiegand D0 data line */
+    gpio_t       d1;      /**< Wiegand D1 data line */
+    gpio_flank_t flank;   /**< flank detection */
+  } wiegand_params_t;
+
+  /**
+   * @brief   Device descriptor for a wiegand device
+   */
+  typedef struct {
+    uint32_t code;                         /**< Wiegand code */
+    int16_t type;                          /**< Wiegand type */
+    volatile uint32_t wg_card_temp_high;   /**< Card MSB */
+    volatile uint32_t wg_card_temp;        /**< Card LSV  */

Yes. We can use only one 64 bit integer. I suppose that the original author of the algorithm wanted to make the code a little bit more readable when decoding the Mifare 34 format.

Let me do this little change.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12217#discussion_r328399167
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190925/64fc063b/attachment.htm>


More information about the notifications mailing list