7 #ifndef __MSP430WARE_MPY32_H__
8 #define __MSP430WARE_MPY32_H__
10 #include "inc/hw_memmap.h"
12 #ifdef __MSP430_HAS_MPY32__
25 #include "inc/hw_memmap.h"
33 #define MPY32_WRITEDELAY_OFF (!(MPYDLY32 + MPYDLYWRTEN))
34 #define MPY32_WRITEDELAY_32BIT (MPYDLYWRTEN)
35 #define MPY32_WRITEDELAY_64BIT (MPYDLY32 + MPYDLYWRTEN)
45 #define MPY32_MULTIPLY_UNSIGNED (0x00)
46 #define MPY32_MULTIPLY_SIGNED (0x02)
47 #define MPY32_MULTIPLYACCUMULATE_UNSIGNED (0x04)
48 #define MPY32_MULTIPLYACCUMULATE_SIGNED (0x06)
56 #define MPY32_SATURATION_MODE_DISABLED 0x00
57 #define MPY32_SATURATION_MODE_ENABLED MPYSAT
65 #define MPY32_FRACTIONAL_MODE_DISABLED 0x00
66 #define MPY32_FRACTIONAL_MODE_ENABLED MPYFRAC
414 #endif // __MSP430WARE_MPY32_H__
void MPY32_disableFractionalMode(void)
Disables Fraction Mode.
Definition: mpy32.c:47
void MPY32_disableSaturationMode(void)
Disables Saturation Mode.
Definition: mpy32.c:32
uint8_t MPY32_getSaturationMode(void)
Gets the Saturation Mode.
Definition: mpy32.c:37
void MPY32_setOperandTwo32Bit(uint32_t operand)
Sets an 32-bit value into operand 2, which starts the multiplication.
Definition: mpy32.c:101
uint8_t MPY32_getFractionalMode(void)
Gets the Fractional Mode.
Definition: mpy32.c:52
void MPY32_setOperandOne24Bit(uint8_t multiplicationType, uint32_t operand)
Sets an 24-bit value into operand 1.
Definition: mpy32.c:69
uint16_t MPY32_getCarryBitValue(void)
Returns the Carry Bit of the last multiplication operation.
Definition: mpy32.c:123
void MPY32_setOperandOne8Bit(uint8_t multiplicationType, uint8_t operand)
Sets an 8-bit value into operand 1.
Definition: mpy32.c:57
void MPY32_enableFractionalMode(void)
Enables Fraction Mode.
Definition: mpy32.c:42
void MPY32_setWriteDelay(uint16_t writeDelaySelect)
Sets the write delay setting for the MPY32 module.
Definition: mpy32.c:21
void MPY32_setOperandTwo16Bit(uint16_t operand)
Sets an 16-bit value into operand 2, which starts the multiplication.
Definition: mpy32.c:90
void MPY32_setOperandOne32Bit(uint8_t multiplicationType, uint32_t operand)
Sets an 32-bit value into operand 1.
Definition: mpy32.c:77
void MPY32_clearCarryBitValue(void)
Clears the Carry Bit of the last multiplication operation.
Definition: mpy32.c:127
void MPY32_preloadResult(uint64_t result)
Preloads the result register.
Definition: mpy32.c:131
void MPY32_enableSaturationMode(void)
Enables Saturation Mode.
Definition: mpy32.c:27
void MPY32_setOperandTwo8Bit(uint8_t operand)
Sets an 8-bit value into operand 2, which starts the multiplication.
Definition: mpy32.c:85
uint16_t MPY32_getSumExtension(void)
Returns the Sum Extension of the last multiplication operation.
Definition: mpy32.c:118
uint64_t MPY32_getResult(void)
Returns an 64-bit result of the last multiplication operation.
Definition: mpy32.c:107
void MPY32_setOperandTwo24Bit(uint32_t operand)
Sets an 24-bit value into operand 2, which starts the multiplication.
Definition: mpy32.c:95
void MPY32_setOperandOne16Bit(uint8_t multiplicationType, uint16_t operand)
Sets an 16-bit value into operand 1.
Definition: mpy32.c:63