File indexing completed on 2025-12-17 09:20:03
0001 #ifndef EPD_EPDDEFS_H
0002 #define EPD_EPDDEFS_H
0003
0004 #pragma GCC diagnostic push
0005 #pragma GCC diagnostic ignored "-Wunused-function"
0006
0007 namespace EPDDefs
0008 {
0009
0010
0011
0012
0013
0014 static unsigned int get_arm(uint32_t key)
0015 {
0016 return (key >> 9) & 0x1;
0017 }
0018 static unsigned int get_sector(uint32_t key)
0019 {
0020 return (key >> 5) & 0xF;
0021 }
0022 static unsigned int get_tileid(uint32_t key)
0023 {
0024 return (key) &0x1F;
0025 }
0026 static uint32_t make_epd_key(uint32_t arm, uint32_t sector, uint32_t tile_id)
0027 {
0028 return (arm << 9U | sector << 5U | tile_id) & 0x3FF;
0029 }
0030 }
0031
0032 #pragma GCC diagnostic pop
0033 #endif