Pages: [1]   Go Down
Author Topic: -> operator  (Read 187 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ");
  PrintBytes(addr,8);
  Serial.println();
   
  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
  net->reset();

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

Thanks
Logged

France
Offline Offline
God Member
*****
Karma: 29
Posts: 898
Scientia potentia est.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello and welcome smiley

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

Pages: [1]   Go Up
Jump to: