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


This topic contains 0 replies, has 1 voice, and was last updated by  Shadow 4 years, 1 month ago.

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.