/* Use this function to calcute pulse width for per degree rotation.  */
static uint32_t servo_per_degree_init(uint32_t degree_of_rotation)
/* Use this function to calcute pulse width for per degree rotation.  */
static uint32_t servo_per_degree_init(uint32_t degree_of_rotation)
{
    uint32_t cal_pulsewidth = 0;
    cal_pulsewidth = (SERVO_MIN_PULSEWIDTH + (((SERVO_MAX_PULSEWIDTH - SERVO_MIN_PULSEWIDTH) * (degree_of_rotation)) / (SERVO_MAX_DEGREE)));
    return cal_pulsewidth;
}