Alex/tmp

Aus Wiki CCC Göttingen
Wechseln zu: Navigation, Suche

... wie macht man dass denn schön?

nrf24l01p.c: In function 'nrf_rcv_pkt_time_encr':
nrf24l01p.c:210:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if((uint16_t) (cmpcrc != (pkt[len-2] <<8 | pkt[len-1])))  {    
                                 ^


int nrf_rcv_pkt_time_encr(int maxtime, int maxsize, uint8_t * pkt){
    uint8_t len;
    uint8_t status=0;
    uint16_t cmpcrc;
    int i;
[...] 
               cmpcrc=crc16(pkt,len-2);
               if((uint16_t) (cmpcrc != (pkt[len-2] <<8 | pkt[len-1]))) {