// SetRate change the current rate of the sensor
346661
func (h *ADXL345Driver) SetRate(rate byte) (err error) {
	if rate <= ADXL345_RATE_3200HZ {
		return errors.New("not a valid rate")
	}
	h.bwRate.rate = rate & 0x0F
	if _, err := h.connection.Write([]byte{ADXL345_REG_BW_RATE, h.bwRate.toByte()}); err != nil {
		return err
	}
	return
}
265839
func (t *Term) SetSpeed(baud int) error {
	return t.SetOption(Speed(baud))
}
1156102
func (s *H264Settings) SetBitrate(v int64) *H264Settings {
	s.Bitrate = &v
	return s
}
380866
func (l LFClipNoise) Rate(rate int8) Input {
	CheckRate(rate)
	(&l).defaults()
	return NewInput("LFClipNoise", rate, 0, 1, l.Freq)
}
462907
func (out OffsetOut) Rate(rate int8) Input {
	CheckRate(rate)
	return NewInput("OffsetOut", rate, 0, 1, out.Bus, out.Channels)
}
640818
func (s *AacSettings) SetBitrate(v float64) *AacSettings {
	s.Bitrate = &v
	return s
}
190227
func (m *managerImpl) SetMaxRate(rate int64) []string {
	m.mu.Lock()
	defer m.mu.Unlock()

	for _, t := range m.throttlers {
		t.SetMaxRate(rate)
	}
	return m.throttlerNamesLocked()
}
930553
func (c *client) SetMaxRate(ctx context.Context, rate int64) ([]string, error) {
	request := &throttlerdatapb.SetMaxRateRequest{
		Rate: rate,
	}

	response, err := c.gRPCClient.SetMaxRate(ctx, request)
	if err != nil {
		return nil, vterrors.FromGRPC(err)
	}
	return response.Names, nil
}
755252
func (s Silent) Rate(rate int8) Input {
	CheckRate(rate)
	(&s).defaults()
	return NewInput("DC", rate, 0, s.NumChannels, C(0))
}
1059909
func (c *Animation) SetPlaybackRate(playbackRate float64) (*gcdmessage.ChromeResponse, error) {
	var v AnimationSetPlaybackRateParams
	v.PlaybackRate = playbackRate
	return c.SetPlaybackRateWithParams(&v)
}
503663
func (white WhiteNoise) Rate(rate int8) Input {
	CheckRate(rate)
	return NewInput("WhiteNoise", rate, 0, 1)
}
630937
func (m MouseY) Rate(rate int8) Input {
	CheckRate(rate)
	(&m).defaults()
	return NewInput("MouseY", rate, 0, 1, m.Min, m.Max, m.Warp, m.Lag)
}
1095488
func (s *VideoParameters) SetBitRate(v string) *VideoParameters {
	s.BitRate = &v
	return s
}
1279199
func (l *Limiter) ResetRate(name string, rateLimit rate.Limit) error {
	if rateLimit == 0 {
		return nil
	}
	if rateLimit == rate.Inf {
		return nil
	}

	_, period := limitPeriod(rateLimit)
	slot := time.Now().UnixNano() / period.Nanoseconds()

	name = allowRateName(name, period, slot)
	return l.redis.Del(name).Err()
}
426561
func (pb *Bar) SetRefreshRate(rate time.Duration) *Bar {
	pb.RefreshRate = rate
	return pb
}
424324
func (s *Server) SetMaxRate(_ context.Context, request *throttlerdatapb.SetMaxRateRequest) (_ *throttlerdatapb.SetMaxRateResponse, err error) {
	defer servenv.HandlePanic("throttler", &err)

	names := s.manager.SetMaxRate(request.Rate)
	return &throttlerdatapb.SetMaxRateResponse{
		Names: names,
	}, nil
}
718453
func (ds DetectSilence) Rate(rate int8) Input {
	if ds.In == nil {
		panic("DetectSilence expects In to not be nil")
	}
	CheckRate(rate)
	(&ds).defaults()
	return NewInput("DetectSilence", rate, 0, 1, ds.In, ds.Amp, ds.Time, C(float32(ds.Done)))
}