battmem.resource Reference¶
Comprehensive function reference for battmem.resource, synthesised from the AmigaOS NDK 3.2 Release 4 (Autodocs/battmem).
This page documents 4 functions of battmem.resource. Each function entry follows the canonical autodoc format. struct Name, union Name, enum Name are clickable links to the type definition in the types reference.
Function index¶
ObtainBattSemaphore()¶
ObtainBattSemaphore -- Obtain access to nonvolatile ram.
Synopsis
ObtainBattSemaphore( )
void ObtainBattSemaphore( void );
Function
Aquires exclusive access to the system nonvolatile ram.
ReadBattMem()¶
ReadBattMem -- Read a bitstring from nonvolatile ram.
Synopsis
Error = ReadBattMem( Buffer, Offset, Len )
D0 A0 D0 D1
ULONG ReadBattMem( APTR, ULONG, ULONG );
Function
Read a bitstring from nonvolatile ram.
Inputs
Buffer Where to put the bitstring. Offset Bit offset of first bit to read. Len Length of bitstring to read.
Results
Error Zero if no error.
Notes
The battery-backed memory is checksummed. If a checksum error is detected, all bits in the battery-backed memory are silently set to zero.
Bits in the battery-backed memory that do not exist are read as zero.
Partial byte reads (less than 8 bits) result in the bits read being put in the low-order bits of the destination byte.
ReleaseBattSemaphore()¶
ReleaseBattSemaphore -- Allow nonvolatile ram to others.
Synopsis
ReleaseBattSemaphore( )
void ReleaseBattSemaphore( void );
Function
Relinquish exclusive access to the system nonvolatile ram.
WriteBattMem()¶
WriteBattMem -- Write a bitstring to nonvolatile ram.
Synopsis
Error = WriteBattMem( Buffer, Offset, Len )
D0 A0 D0 D1
ULONG WriteBattMem( APTR, ULONG, ULONG );
Function
Write a bitstring to the nonvolatile ram.
Inputs
Buffer Where to get the bitstring. Offset Bit offset of first bit to write. Len Length of bitstring to write.
Results
Error Zero if no error.
Notes
The battery-backed memory is checksummed. If a checksum error is detected, all bits in the battery-backed memory are silently set to zero.
Partial byte writes (less than 8 bits) result in the bits written being read from the low-order bits of the source byte.