]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/asix-sigma/protocol.c
asix-sigma: update copyright notice for recent non-trivial changes
[libsigrok.git] / src / hardware / asix-sigma / protocol.c
index 1875b75658d8358f4a41938f5e0a6c9d64d23476..74b3a9fcff0a2ed14c9cf8c564de8cd2466fddb8 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (C) 2010-2012 Håvard Espeland <gus@ping.uio.no>,
  * Copyright (C) 2010 Martin Stensgård <mastensg@ping.uio.no>
  * Copyright (C) 2010 Carl Henrik Lunde <chlunde@ping.uio.no>
+ * Copyright (C) 2020 Gerhard Sittig <gerhard.sittig@gmx.net>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -1121,7 +1122,7 @@ static int check_and_submit_sample(struct dev_context *devc,
  */
 static uint16_t sigma_dram_cluster_ts(struct sigma_dram_cluster *cluster)
 {
-       return read_u16le(&cluster->timestamp[0]);
+       return read_u16le((const uint8_t *)&cluster->timestamp);
 }
 
 /*
@@ -1129,7 +1130,7 @@ static uint16_t sigma_dram_cluster_ts(struct sigma_dram_cluster *cluster)
  */
 static uint16_t sigma_dram_cluster_data(struct sigma_dram_cluster *cl, int idx)
 {
-       return read_u16le(&cl->samples[idx].sample[0]);
+       return read_u16le((const uint8_t *)&cl->samples[idx]);
 }
 
 /*