description. This macro converts a bit definition into a bit mask. It is intended to be used with the bit definitions in the io.h header file. For instance, to build a mask of both the wdtoe and wde watchdog bits, you would use "BV(WDTOE) | BV(WDE)".
description. Returns 1 if the specified bit in port is clear. bit can be 0 to 7. This function uses the sbic instruction to test the bit, so port needs to be a valid address for that instruction.
description. Returns 1 if the specified bit in port is set. bit can be 0 to 7. This function uses the sbis instruction to test the bit, so port needs to be a valid address for that instruction.
description. Clears the specified bit, bit, in the I/O register specified by port. bit is a value from 0 to 7 and should be specified as one of the defined symbols in the I/O header files. If port specifies an actual I/O register, this macro reduces to a single in-line assembly instruction. If it isn't an I/O register, it attempts to generate the most efficient code to complete the operation.
see also. sbi()
description. Reads the 8-bit value from the I/O port specified by port. If port is a constant value, this macro assumes the value refers to a valid address and tries to use the in instruction. A variable argument results in an access using direct addressing.
description. Reads a 16-bit value from I/O registers. This routine was created for accessing the 16-bit registers (ADC, ICR1, OCR1, TCNT1) because they need to be read in the proper order. This macro should only be used if interrupts are disabled since it only generates the two lines of assembly that reads the register.
description. Atomically reads a 16-bit value from I/O registers. The generated code disables interrupts during the access and properly restores the interrupt state when through. This routine was created for accessing the 16-bit registers (ADC, ICR1, OCR1, TCNT1) because they need to be read in the proper order. This macro can safely be used in interrupt and non-interrupt routines because it preserves the interrupt enable flag (although you may not want to pay for the extra lines of assembly in an interrupt routine.)
description. This macro generates a very tight polling loop that waits for a bit to become cleared. It uses the sbic instruction to perform the test, so the value of port is restricted to valid I/O register addresses for that instruction. bit is a value from 0 to 7.
description. This macro generates a very tight polling loop that waits for a bit to become set. It uses the cbic instruction to perform the test, so the value of port is restricted to valid I/O register addresses for that instruction. bit is a value from 0 to 7.
description. Writes the 8-bit value val to port. If port is a constant value, this macro assumes the value refers to a valid address and tries to use the out instruction. A variable argument results in an access using direct addressing.
description. Writes to a 16-bit I/O register. This routine was created for manipulating the 16-bit registers (ADC, ICR1, OCR1, TCNT1) because they need to be written in the proper order. This macro should only be used if interrupts are disabled since it only generates the two lines of assembly that modify the register.
description. Atomically writes to a 16-bit I/O register. The generated code disables interrupts during the access and properly restores the interrupt state when through. This routine was created for accessing the 16-bit registers (ADC, ICR1, OCR1, TCNT1) because they need to be written in the proper order. This macro can safely be used in interrupt and non-interrupt routines because it preserves the interrupt enable flag (although you may not want to pay for the extra lines of assembly in an interrupt routine.)
description. Returns 1 if val has even parity. All eight bits are used in the calculation.
description. Sets the specified bit, bit, in the I/O register specified by port. bit is a value from 0 to 7 and should be specified as one of the defined symbols in the I/O header files. If port specifies an actual I/O register, this macro reduces to a single in-line assembly instruction. If it isn't an I/O register, it attempts to generate the most efficient code to complete the operation.
see also. cbi()