Functions | |
void | SD24_init (uint16_t baseAddress, uint8_t referenceSelect) |
Initializes the SD24 Module. More... | |
void | SD24_initConverter (uint16_t baseAddress, uint16_t converter, uint16_t conversionMode) |
Configure SD24 converter. More... | |
void | SD24_initConverterAdvanced (uint16_t baseAddress, SD24_initConverterAdvancedParam *param) |
Configure SD24 converter - Advanced Configure. More... | |
void | SD24_setConverterDataFormat (uint16_t baseAddress, uint16_t converter, uint16_t dataFormat) |
Set SD24 converter data format. More... | |
void | SD24_startConverterConversion (uint16_t baseAddress, uint8_t converter) |
Start Conversion for Converter. More... | |
void | SD24_stopConverterConversion (uint16_t baseAddress, uint8_t converter) |
Stop Conversion for Converter. More... | |
void | SD24_setInputChannel (uint16_t baseAddress, uint8_t converter, uint8_t inputChannel) |
Configures the input channel. More... | |
void | SD24_setInterruptDelay (uint16_t baseAddress, uint8_t converter, uint8_t interruptDelay) |
Configures the delay for an interrupt to trigger. More... | |
void | SD24_setOversampling (uint16_t baseAddress, uint8_t converter, uint16_t oversampleRatio) |
Configures the oversampling ratio for a converter. More... | |
void | SD24_setGain (uint16_t baseAddress, uint8_t converter, uint8_t gain) |
Configures the gain for the converter. More... | |
uint32_t | SD24_getResults (uint16_t baseAddress, uint8_t converter) |
Returns the results for a converter. More... | |
uint16_t | SD24_getHighWordResults (uint16_t baseAddress, uint8_t converter) |
Returns the high word results for a converter. More... | |
void | SD24_enableInterrupt (uint16_t baseAddress, uint8_t converter, uint16_t mask) |
Enables interrupts for the SD24 Module. More... | |
void | SD24_disableInterrupt (uint16_t baseAddress, uint8_t converter, uint16_t mask) |
Disables interrupts for the SD24 Module. More... | |
void | SD24_clearInterrupt (uint16_t baseAddress, uint8_t converter, uint16_t mask) |
Clears interrupts for the SD24 Module. More... | |
uint16_t | SD24_getInterruptStatus (uint16_t baseAddress, uint8_t converter, uint16_t mask) |
Returns the interrupt status for the SD24 Module. More... | |
void SD24_clearInterrupt | ( | uint16_t | baseAddress, |
uint8_t | converter, | ||
uint16_t | mask | ||
) |
Clears interrupts for the SD24 Module.
This function clears interrupt flags for the SD24 module.
baseAddress | is the base address of the SD24 module. |
converter | is the selected converter. Valid values are:
|
mask | is the bit mask of the converter interrupt sources to clear. Mask value is the logical OR of any of the following:
|
void SD24_disableInterrupt | ( | uint16_t | baseAddress, |
uint8_t | converter, | ||
uint16_t | mask | ||
) |
Disables interrupts for the SD24 Module.
This function disables interrupts for the SD24 module.
baseAddress | is the base address of the SD24 module. |
converter | is the selected converter. Valid values are:
|
mask | is the bit mask of the converter interrupt sources to be disabled. Mask value is the logical OR of any of the following:
|
Modified bits of SD24BIE register.
void SD24_enableInterrupt | ( | uint16_t | baseAddress, |
uint8_t | converter, | ||
uint16_t | mask | ||
) |
Enables interrupts for the SD24 Module.
This function enables interrupts for the SD24 module. Does not clear interrupt flags.
baseAddress | is the base address of the SD24 module. |
converter | is the selected converter. Valid values are:
|
mask | is the bit mask of the converter interrupt sources to be enabled. Mask value is the logical OR of any of the following:
|
uint16_t SD24_getHighWordResults | ( | uint16_t | baseAddress, |
uint8_t | converter | ||
) |
Returns the high word results for a converter.
This function gets the upper 16-bit result from the SD24MEMx register and returns it.
baseAddress | is the base address of the SD24 module. |
converter | selects the converter who's results will be returned Valid values are:
|
uint16_t SD24_getInterruptStatus | ( | uint16_t | baseAddress, |
uint8_t | converter, | ||
uint16_t | mask | ||
) |
Returns the interrupt status for the SD24 Module.
This function returns interrupt flag statuses for the SD24 module.
baseAddress | is the base address of the SD24 module. |
converter | is the selected converter. Valid values are:
|
mask | is the bit mask of the converter interrupt sources to return. Mask value is the logical OR of any of the following:
|
uint32_t SD24_getResults | ( | uint16_t | baseAddress, |
uint8_t | converter | ||
) |
Returns the results for a converter.
This function gets the results from the SD24MEMx register for upper 16-bit and lower 16-bit results, and concatenates them to form a long. The actual result is a maximum 24 bits.
baseAddress | is the base address of the SD24 module. |
converter | selects the converter who's results will be returned Valid values are:
|
void SD24_init | ( | uint16_t | baseAddress, |
uint8_t | referenceSelect | ||
) |
Initializes the SD24 Module.
This function initializes the SD24 module sigma-delta analog-to-digital conversions. Specifically the function sets up the clock source for the SD24 core to use for conversions. Upon completion of the initialization the SD24 interrupt registers will be reset and the given parameters will be set. The converter configuration settings are independent of this function.
baseAddress | is the base address of the SD24 module. |
referenceSelect | selects the reference source for the SD24 core Valid values are:
|
void SD24_initConverter | ( | uint16_t | baseAddress, |
uint16_t | converter, | ||
uint16_t | conversionMode | ||
) |
Configure SD24 converter.
This function initializes a converter of the SD24 module. Upon completion the converter will be ready for a conversion and can be started with the SD24_startConverterConversion(). Additional configuration such as data format can be configured in SD24_setConverterDataFormat().
baseAddress | is the base address of the SD24 module. |
converter | selects the converter that will be configured. Check check datasheet for available converters on device. Valid values are:
|
conversionMode | determines whether the converter will do continuous samples or a single sample Valid values are:
|
void SD24_initConverterAdvanced | ( | uint16_t | baseAddress, |
SD24_initConverterAdvancedParam * | param | ||
) |
Configure SD24 converter - Advanced Configure.
This function initializes a converter of the SD24 module. Upon completion the converter will be ready for a conversion and can be started with the SD24_startConverterConversion().
baseAddress | is the base address of the SD24 module. |
param | is the pointer to struct for converter advanced configuration. |
References SD24_initConverterAdvancedParam::conversionMode, SD24_initConverterAdvancedParam::converter, SD24_initConverterAdvancedParam::dataFormat, SD24_initConverterAdvancedParam::gain, SD24_initConverterAdvancedParam::groupEnable, SD24_initConverterAdvancedParam::inputChannel, SD24_initConverterAdvancedParam::interruptDelay, and SD24_initConverterAdvancedParam::oversampleRatio.
void SD24_setConverterDataFormat | ( | uint16_t | baseAddress, |
uint16_t | converter, | ||
uint16_t | dataFormat | ||
) |
Set SD24 converter data format.
This function sets the converter format so that the resulting data can be viewed in either binary or 2's complement.
baseAddress | is the base address of the SD24 module. |
converter | selects the converter that will be configured. Check check datasheet for available converters on device. Valid values are:
|
dataFormat | selects how the data format of the results Valid values are:
|
void SD24_setGain | ( | uint16_t | baseAddress, |
uint8_t | converter, | ||
uint8_t | gain | ||
) |
Configures the gain for the converter.
This function configures the gain for a single converter.
baseAddress | is the base address of the SD24 module. |
converter | selects the converter that will be configured Valid values are:
|
gain | selects the gain for the converter Valid values are:
|
void SD24_setInputChannel | ( | uint16_t | baseAddress, |
uint8_t | converter, | ||
uint8_t | inputChannel | ||
) |
Configures the input channel.
This function configures the input channel. For MSP430i2xx devices, users can choose either analog input or internal temperature input.
baseAddress | is the base address of the SD24 module. |
converter | selects the converter that will be configured Valid values are:
|
inputChannel | selects oversampling ratio for the converter Valid values are:
|
void SD24_setInterruptDelay | ( | uint16_t | baseAddress, |
uint8_t | converter, | ||
uint8_t | interruptDelay | ||
) |
Configures the delay for an interrupt to trigger.
This function configures the delay for the first interrupt service request for the corresponding converter. This feature delays the interrupt request for a completed conversion by up to four conversion cycles allowing the digital filter to settle prior to generating an interrupt request.
baseAddress | is the base address of the SD24 module. |
converter | selects the converter that will be stopped Valid values are:
|
interruptDelay | selects the delay for the interrupt Valid values are:
|
void SD24_setOversampling | ( | uint16_t | baseAddress, |
uint8_t | converter, | ||
uint16_t | oversampleRatio | ||
) |
Configures the oversampling ratio for a converter.
This function configures the oversampling ratio for a given converter.
baseAddress | is the base address of the SD24 module. |
converter | selects the converter that will be configured Valid values are:
|
oversampleRatio | selects oversampling ratio for the converter Valid values are:
|
void SD24_startConverterConversion | ( | uint16_t | baseAddress, |
uint8_t | converter | ||
) |
Start Conversion for Converter.
This function starts a single converter.
baseAddress | is the base address of the SD24 module. |
converter | selects the converter that will be started Valid values are:
|
void SD24_stopConverterConversion | ( | uint16_t | baseAddress, |
uint8_t | converter | ||
) |
Stop Conversion for Converter.
This function stops a single converter.
baseAddress | is the base address of the SD24 module. |
converter | selects the converter that will be stopped Valid values are:
|