Home Forums PS2X PlayStation 2 Controller Library Support Forum explain a code snippet from PSX2 lib


  • This topic has 0 replies, 1 voice, and was last updated 9 years ago by Anonymous.
Viewing 1 post (of 1 total)
  • Author
  • #3321

    I have been trying to understand the PSX2 library. I like to understand whats under the hood actually.

    here is the code snippet where i am stuck:

    inline void  PS2X::CMD_SET(void) {

    register uint8_t old_sreg = SREG;


    *_cmd_oreg |= _cmd_mask;

    SREG = old_sreg;


    I cant understand   *_cmd_oreg |= _cmd_mask; because “_cmd_oreg” is of type uint8_t, why are we using * in front of it. i tried to use it with some other values and different variable name seperately on compiler but it throws up an error “invalid type argument of ‘unary *’ “

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.