Home
Roadside
Carputer
geoHist
software
FRC
Blog
Now you can download a copy of these docs so you can use them offline!
Download now
Main Page
Related Pages
Classes
Files
File List
InterruptableSensorBase.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) FIRST 2008. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5
/*----------------------------------------------------------------------------*/
6
7
#ifndef INTERRUPTABLE_SENSORBASE_H_
8
#define INTERRUPTABLE_SENSORBASE_H_
9
10
#include "ChipObject.h"
11
#include "SensorBase.h"
12
13
class
InterruptableSensorBase
:
public
SensorBase
14
{
15
public
:
16
InterruptableSensorBase
();
17
virtual
~
InterruptableSensorBase
();
18
virtual
void
RequestInterrupts
(tInterruptHandler handler,
void
*param) = 0;
19
virtual
void
RequestInterrupts
() = 0;
20
virtual
void
CancelInterrupts
();
21
virtual
void
WaitForInterrupt
(
float
timeout);
22
virtual
void
EnableInterrupts
();
23
virtual
void
DisableInterrupts
();
24
virtual
double
ReadInterruptTimestamp
();
25
protected
:
26
tInterrupt *m_interrupt;
27
tInterruptManager *m_manager;
28
uint32_t m_interruptIndex;
29
void
AllocateInterrupts(
bool
watcher);
30
};
31
32
#endif
33
InterruptableSensorBase::DisableInterrupts
virtual void DisableInterrupts()
Disable, but don't deallocate.
Definition:
InterruptableSensorBase.cpp:77
InterruptableSensorBase::CancelInterrupts
virtual void CancelInterrupts()
Free up the underlying chipobject functions.
Definition:
InterruptableSensorBase.cpp:37
InterruptableSensorBase::RequestInterrupts
virtual void RequestInterrupts()=0
Synchronus Wait version.
InterruptableSensorBase::WaitForInterrupt
virtual void WaitForInterrupt(float timeout)
Synchronus version.
Definition:
InterruptableSensorBase.cpp:51
InterruptableSensorBase
Definition:
InterruptableSensorBase.h:13
InterruptableSensorBase::ReadInterruptTimestamp
virtual double ReadInterruptTimestamp()
Return the timestamp for the interrupt that occurred.
Definition:
InterruptableSensorBase.cpp:91
InterruptableSensorBase::EnableInterrupts
virtual void EnableInterrupts()
Enable interrupts - after finishing setup.
Definition:
InterruptableSensorBase.cpp:65
SensorBase
Definition:
SensorBase.h:20
Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by
1.8.6
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.