Ср авг 10, 2016 20:28:21
Ср авг 10, 2016 21:18:51
Ср авг 10, 2016 21:29:17
Чт ноя 17, 2016 11:47:30
Похоже, предлагается писать там внутри. Но как я туда перетащу все свои переменные, чтобы они не затёрлись при следующей перегенерации?void ISR_Interrupt(void)
Description: The default ISR for the component. Add custom code between the START and END comments to keep the next version of this file from over-writing your code.
Чт ноя 17, 2016 18:39:07
Чт ноя 17, 2016 21:14:51
Чт ноя 17, 2016 23:22:03
Чт ноя 17, 2016 23:57:49
Пт ноя 18, 2016 02:25:58
Вс ноя 20, 2016 19:19:11
Вс ноя 20, 2016 19:40:58
Пн ноя 21, 2016 10:59:52
I2C_SET_I2C_SCL_HSIOM_SEL(I2C_HSIOM_GPIO_SEL); // Switch to GPIO
PSoC\Blinking LED\Blinking LED.cydsn/main.c:78: undefined reference to `I2C_SET_I2C_SCL_HSIOM_SEL'
Вт ноя 22, 2016 05:46:06
Вт ноя 22, 2016 18:17:07
Ср ноя 23, 2016 04:44:41
CY_SET_REG32(CYREG_HSIOM_PORT_SEL1, 0x0000); // assign I2C pins to GPIO
uint32 i;
for (i=0; i<10; i++) // toggle SCL pin 10 times
{
CY_SYS_PINS_CLEAR_PIN(CYREG_PRT1_DR, 2); // set SCL pin low
CyDelay(1);
CY_SYS_PINS_SET_PIN(CYREG_PRT1_DR, 2); // set SCL pin high
CyDelay(1);
}
CY_SET_REG32(CYREG_HSIOM_PORT_SEL1, 0xEE00); // assign I2C pins to SCB
Пт ноя 25, 2016 22:04:27
CY_SET_REG32(CYREG_HSIOM_PORT_SEL1, I2C_HSIOM_I2C_SEL<<(I2C_SCL_PIN_INDEX*4+8) | I2C_HSIOM_I2C_SEL<<(I2C_SDA_PIN_INDEX*4+8) );
Сб ноя 26, 2016 07:51:44
Сб ноя 26, 2016 22:16:00
// EEPROM
static const uint8 CYCODE century=0x20, timezone=2, dst=0, dst_enable=1, leadingzero=0 ;
int main() {
uint8 temp_EE;
....
temp_EE = ((*(volatile uint8 *) &leadingzero) == 0) ? 1 : 0;
EEPROM_Write(&temp_EE, &leadingzero, 1u);
.....
}
Сб ноя 26, 2016 23:08:16
Вс ноя 27, 2016 08:37:21
int main(void) {
uint8 temp_EE;
Clock_Start();
PushPull_PWM_Start();
I2C_Start();
I2C_Reset();
EEPROM_Start();
ISR_Scan_StartEx(ISR_Scan);
temp_EE = 1;
EEPROM_Write(&temp_EE, &leadingzero, 1u);
CySysWdtEnable();
/* Make sure that interrupt is forwarded to the CPU */
CySysWdtUnmaskInterrupt();
CyGlobalIntEnable; /* Enable global interrupts. */