Lines Matching defs:FRAC_BITS
79 #define FRAC_BITS 6
87 #if FRAC_BITS > 8
88 #error FRAC_BITS must be less or equal 8
95 /** creates a Qx.FRAC_BITS from session's 'ack_random_factor' */
97 Q(FRAC_BITS, session->ack_random_factor)
99 /** creates a Qx.FRAC_BITS from session's 'ack_timeout' */
100 #define ACK_TIMEOUT Q(FRAC_BITS, session->ack_timeout)
878 * Qx.FRAC_BITS fixed point notation, whereas the passed parameter @p r
891 /* The integer 1.0 as a Qx.FRAC_BITS */
892 #define FP1 Q(FRAC_BITS, ((coap_fixed_point_t){1,0}))
898 * make the result a rounded Qx.FRAC_BITS */
902 * make the result a rounded Qx.FRAC_BITS */
903 result = SHR_FP(((result + FP1) * ACK_TIMEOUT), FRAC_BITS);
906 * (yields a Qx.FRAC_BITS) and shift to get an integer */
907 return SHR_FP((COAP_TICKS_PER_SECOND * result), FRAC_BITS);