Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

Class «core::Interrupt»

Hardware interrupt resource.

public: Interrupt();

Constructor.

public: Interrupt(::api::Task& handler, int32 source);

Constructor.

Parameters:
handler — user class which implements an interrupt handler interface.
source — available interrupt source.

public: virtual ~Interrupt();

Destructor.

public: virtual void clear();

Clears an interrupt status of this source.

public: virtual bool disable();

Disables a controller.

Returns:
an enable source bit value of a controller before method was called.

public: virtual void enable(bool status);

Enables a controller.

Parameters:
status — returned status by disable method.

public: Type enable(bool status, Type ret);

Enables a controller.

Parameters:
status — returned status by disable method.
ret — value which will be returned.

Returns:
given value.

public: static ::api::Toggle& global();

Returns the toggle interface for controlling global interrupts.

Returns:
toggle interface.

public: virtual bool isConstructed() const;

Tests if this object has been constructed.

Returns:
true if object has been constructed successfully.

public: static bool isObject(const Type* obj);

Tests if given object has been constructed object.

Parameters:
obj — pointer to object.

Returns:
true if object has been constructed successfully.

public: virtual void jump();

Jumps to interrupt hardware vector.

public: void operator delete(void* ptr);

Operator delete.

Parameters:
ptr — address of allocated memory block or a null pointer.

public: void* operator new(size_t size);

Operator new.

Parameters:
size — number of bytes to allocate.

Returns:
allocated memory address or a null pointer.

public: void* operator new(size_t size, void* ptr);

Operator new.

Parameters:
size — unused.
ptr — pointer to reserved memory area

Returns:
given pointer.

public: virtual void set();

Sets an interrupt status of this source.

protected: static Type alloc(size_t size);

Allocates memory.

Parameters:
size — number of bytes to allocate.

Returns:
allocated memory address or a null pointer.

protected: static void free(void* ptr);

Frees an allocated memory.

Parameters:
ptr — address of allocated memory block or a null pointer.

protected: virtual void setConstruct(bool flag);

Sets the object constructed flag.

Parameters:
flag — constructed flag.

Back to class list