首页 > 解决方案 > How to long value compare?

问题描述

BUF->src has like a 37848238928 number. But I want to filter with this if(BUF->src==279383903) serialprint("fine") but it cant be because BUF struct and my number is long how can I compare with these number in if blocks?

Buffer:

#define BUF ((struct uip_eth_hdr *)&uip_buf[0])


struct uip_eth_hdr
{
  struct uip_eth_addr dest;
  struct uip_eth_addr src;
  uint16_t type;
};

struct uip_eth_addr
{
    uint8_t addr[6];
};

标签: cstm32

解决方案


推荐阅读