Skip to content

Commit 2fb904f

Browse files
committed
[MAX326xx] Fixed analogout bugs.
1 parent 301d7f2 commit 2fb904f

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

hal/targets/cmsis/TARGET_Maxim/TARGET_MAX32600/dac_regs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ typedef struct {
103103
__IO uint8_t output_8; /* 0x0000 Write to push values to DAC output FIFO */
104104
__IO uint16_t output_16; /* 0x0000 Write to push values to DAC output FIFO */
105105
};
106-
} mxc_dac_fifo_t;
106+
} mxc_dac_fifo_regs_t;
107107

108108
/*
109109
Register offsets for module DAC12.

hal/targets/cmsis/TARGET_Maxim/TARGET_MAX32610/dac_regs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ typedef struct {
103103
__IO uint8_t output_8; /* 0x0000 Write to push values to DAC output FIFO */
104104
__IO uint16_t output_16; /* 0x0000 Write to push values to DAC output FIFO */
105105
};
106-
} mxc_dac_fifo_t;
106+
} mxc_dac_fifo_regs_t;
107107

108108
/*
109109
Register offsets for module DAC12.

hal/targets/hal/TARGET_Maxim/TARGET_MAX32600/analogout_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void analogout_init(dac_t *obj, PinName pin)
4747

4848
// Set the object pointer
4949
obj->dac = ((mxc_dac_regs_t*)MXC_DAC_GET_DAC((pin & 0x3)));
50-
obj->dac_fifo = ((mxc_dac_fifo_t*)MXC_DAC_GET_FIFO((pin & 0x3)));
50+
obj->dac_fifo = ((mxc_dac_fifo_regs_t*)MXC_DAC_GET_FIFO((pin & 0x3)));
5151
obj->index = (pin & 0x3);
5252

5353
// Set the ADC clock to the system clock frequency
@@ -142,7 +142,7 @@ void analogout_init(dac_t *obj, PinName pin)
142142
(MXC_E_AFE_REF_VOLT_SEL_1500 << MXC_F_AFE_CTRL1_REF_ADC_VOLT_SEL_POS)));
143143

144144
// Disable interpolation
145-
obj->dac->ctrl0 &= MXC_F_DAC_CTRL0_INTERP_MODE;
145+
obj->dac->ctrl0 &= ~MXC_F_DAC_CTRL0_INTERP_MODE;
146146
}
147147

148148
//******************************************************************************

hal/targets/hal/TARGET_Maxim/TARGET_MAX32600/objects.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct dac_s {
101101
int index;
102102
uint16_t out;
103103
mxc_dac_regs_t *dac;
104-
mxc_dac_fifo_t * dac_fifo;
104+
mxc_dac_fifo_regs_t * dac_fifo;
105105
};
106106

107107
typedef struct {

hal/targets/hal/TARGET_Maxim/TARGET_MAX32610/analogout_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void analogout_init(dac_t *obj, PinName pin)
4747

4848
// Set the object pointer
4949
obj->dac = ((mxc_dac_regs_t*)MXC_DAC_GET_DAC((pin & 0x3)));
50-
obj->dac_fifo = ((mxc_dac_fifo_t*)MXC_DAC_GET_FIFO((pin & 0x3)));
50+
obj->dac_fifo = ((mxc_dac_fifo_regs_t*)MXC_DAC_GET_FIFO((pin & 0x3)));
5151
obj->index = (pin & 0x3);
5252

5353
// Set the ADC clock to the system clock frequency
@@ -142,7 +142,7 @@ void analogout_init(dac_t *obj, PinName pin)
142142
(MXC_E_AFE_REF_VOLT_SEL_1500 << MXC_F_AFE_CTRL1_REF_ADC_VOLT_SEL_POS)));
143143

144144
// Disable interpolation
145-
obj->dac->ctrl0 &= MXC_F_DAC_CTRL0_INTERP_MODE;
145+
obj->dac->ctrl0 &= ~MXC_F_DAC_CTRL0_INTERP_MODE;
146146
}
147147

148148
//******************************************************************************

hal/targets/hal/TARGET_Maxim/TARGET_MAX32610/objects.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct dac_s {
101101
int index;
102102
uint16_t out;
103103
mxc_dac_regs_t *dac;
104-
mxc_dac_fifo_t * dac_fifo;
104+
mxc_dac_fifo_regs_t * dac_fifo;
105105
};
106106

107107
typedef struct {

0 commit comments

Comments
 (0)