0

Because i use tabs instead of spaces, the code is available here: http://pastebin.com/ff3m5Cwv

The problem:

In the main, the chip jumps from the first renderTimeTable() call in the main, to memcpy after the blocking while. Anything involving copying spi_buffer array to portbuffer array causes the issue

am i calling the function wrong?

this issue started occuring after i started using memcpy

i am using avr studio 4

MooshBeef
  • 279
  • 1
  • 5
  • 15

1 Answers1

0
      uint8_t portbuffer[8];
      memcpy((void*) spi_buffer, portbuffer,8);

The first parameter in memcpy is the destination, not the source. You are using it the opposite way.

ouah
  • 142,963
  • 15
  • 272
  • 331