Go Down

Topic: -> operator (Read 302 times) previous topic - next topic


I'm checking out the OneWire liblary to use it with an DS 2413.
I have looked at the example for the DS2408 and found a thing that I don't understand.

void ReadAndReport(OneWire* net, uint8_t* addr) {
  Serial.print("  Reading DS2408 ");
  uint8_t buf[13];  // Put everything in the buffer so we can compute CRC easily.
  buf[0] = 0xF0;    // Read PIO Registers
  buf[1] = 0x88;    // LSB address
  buf[2] = 0x00;    // MSB address
  net->write_bytes(buf, 3);
  net->read_bytes(buf+3, 10);     // 3 cmd bytes, 6 data bytes, 2 0xFF, 2 CRC16

In the code, what do the -> operator do?



Hello and welcome :)

Read on this page, the part "Pointers to structures" : http://www.cplusplus.com/doc/tutorial/structures/

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131