qmk_firmware/he-il/proton_c_conversion.md

37 lines
1.6 KiB
Markdown
Raw Normal View History

<div dir="rtl" markdown="1">
# ื”ืžืจื” ืฉืœ ืœื•ื— ืœื”ืฉืชืžืฉ ื‘-Proton C
ืื ืœื•ื— ื ืชืžืš ื‘-QMK ืžืฉืชืžืฉ ื‘ืœื•ื— Pro Micro (ืื• ื›ืœ ืœื•ื— ื ืชืžืš) ื•ืืชื ืจื•ืฆื™ื ืœื”ืฉืชืžืฉ ื‘-Proton C, ื ื™ืชืŸ ืœื™ื™ืฆืจ ืืช ื”ื—ื•ืžืจื” ืข"ื™ ื”ื•ืกืคื” ืฉืœ ื”ืคืงื•ื“ื” `CONVERT_TO_PROTON_C=yes` (ืื• `CTPC=yes`) ืœืคืงื•ื“ืช make, ื›ืžื• ื›ืืŸ:
<div dir="ltr" markdown="1">
```
make 40percentclub/mf68:default CTPC=yes
```
</div>
ื ื™ืชืŸ ืœื”ื•ืกื™ืฃ ืืช ืื•ืชื• ืืจื’ื•ืžื ื˜ ืœืงื•ื‘ืฅ `rules.mk` ื‘ืžื™ืคื•ื™ ื”ืžืงืฉื™ื ืฉืœื›ื, ืฉืชื™ืฆื•ืจ ืืช ืื•ืชื” ื”ืชื•ืฆืื”.
ื”ื“ื‘ืจ ื—ื•ืฉืฃ ืืช ื“ื’ืœ `CONVERT_TO_PROTON_C` ืฉื ื™ืชืŸ ืœื”ืฉืชืžืฉ ื‘ื• ื‘ืงื•ื“ ืฉืœื›ื ื‘ืืžืฆืขื•ืช ืคืงื•ื“ืช `#ifdef`, ื›ืžื• ื›ืืŸ:
<div dir="ltr" markdown="1">
```
#ifdef CONVERT_TO_PROTON_C
// Proton C code
#else
// Pro Micro code
#endif
```
</div>
ืœืคื ื™ ืฉืชืฆืœื™ื—ื• ืœืงืžืคืœ, ื™ื›ื•ืœ ืœื”ื™ื•ืช ืฉืชืงื‘ืœื• ืฉื’ื™ืื•ืช ืฉื•ื ื•ืช ืœื’ื‘ื™ `PORTB/DDRB`, ื•ื›ื•' ืฉืœื ื”ื•ื’ื“ืจื•, ืื ื›ืš, ืชืฆื˜ืจื›ื• ืœื”ืžื™ืจ ืืช ืงื•ื“ื™ ื”ืžืงืœื“ืช ืœื”ืฉืชืžืฉ ื‘ - [ื‘ืงืจื™ GPIO](internals_gpio_control.md) ืฉื™ืขื‘ื“ื• ืขื‘ื•ืจ ARM ื•ื’ื AVR. ื”ื“ื‘ืจ ืœื ืืžื•ืจ ืœื”ืฉืคื™ืข ืขืœ ื”ื‘ื™ืœื“ื™ื ืฉืœ AVR ื‘ื›ืœืœ.
ืœ-Proton C ื™ืฉ ืจืง ืžื ื•ืจืช LED ืื—ืช ืขืœ ื”ืœื•ื— (C13), ื•ื›ื‘ืจื™ืจืช ืžื—ื“ืœ, TXLED (D5) ืžืžื•ืคื” ืืœื™ื•. ืื ืชืจืฆื• ื‘ืžืงื•ื, ืœืžืคื•ืช ืืœื™ื• ืืช RXLED (B0), ื”ื•ืกื™ืคื• ืืช ื”ืฉื•ืจื” ื”ื‘ื ืœืงื•ื‘ืฅ `config.h`:
<div dir="ltr" markdown="1">
```
#define CONVERT_TO_PROTON_C_RXLED
```
</div>
</div>