| 19 | |
| 20 | [[BR]] |
| 21 | == Software == |
| 22 | |
| 23 | '''ethersex-Buildsystem''' |
| 24 | |
| 25 | [http://www.ethersex.de/index.php/Ethersex] [[BR]] oder |
| 26 | [http://dokucode.de/index.php/Ethersex] [[BR]] oder auch |
| 27 | [https://www.zerties.org/index.php/Ethersex] |
| 28 | |
| 29 | [[BR]] |
| 30 | * '''''control6-Support im menuconfig anschalten''''' |
| 31 | |
| 32 | {{{ |
| 33 | [*] control6 scripts (EXPERIMENTAL) |
| 34 | }}} |
| 35 | |
| 36 | [[BR]] |
| 37 | * '''''control6-code''''': |
| 38 | |
| 39 | |
| 40 | {{{ |
| 41 | CONTROL_START |
| 42 | ECMD_GLOBAL(revolutionz, 0, uint16_t); |
| 43 | ON STARTUP DO |
| 44 | |
| 45 | // Pullup-Widerstaende aktivieren |
| 46 | PORTD |= _BV(PORTD3); |
| 47 | DDRD |= _BV(DDD3); |
| 48 | PIND &= ~_BV(PIND3); |
| 49 | |
| 50 | _EIMSK |= _BV(INT1); |
| 51 | |
| 52 | // rising edge |
| 53 | _EICRA |= _BV(ISC10); |
| 54 | _EICRA |= _BV(ISC11); |
| 55 | END |
| 56 | CONTROL_END |
| 57 | |
| 58 | ISR(INT1_vect) |
| 59 | { |
| 60 | revolutionz ++; |
| 61 | } |
| 62 | }}} |
| 63 | |
| 64 | [[BR]] |
| 65 | * '''''config.mk''''' im buildroot anlegen und Pfad und filename anpassen: |
| 66 | |
| 67 | |
| 68 | {{{ |
| 69 | C6_SOURCE = <path_to_source>/your_c6_scriptname.src |
| 70 | }}} |
| 71 | |
| 72 | [[BR]] |
| 73 | * im ../ethersex/pinning/hardware/ eine custom-Platform (your_board.m4) erzeugen mit u.a. diesem Inhalt (siehe ../ethersex/scripts/add-hardware) : |
| 74 | |
| 75 | |
| 76 | {{{ |
| 77 | ifdef(`conf_STATUSLED_TX', `dnl |
| 78 | pin(STATUSLED_TX, PD6, OUTPUT) |
| 79 | ')dnl |
| 80 | |
| 81 | ifdef(`conf_STATUSLED_RX', `dnl |
| 82 | pin(STATUSLED_RX, PD7, OUTPUT) |
| 83 | ')dnl |
| 84 | |
| 85 | ifdef(`conf_RFM12', `dnl |
| 86 | /* port the rfm12 module CS is attached to */ |
| 87 | pin(SPI_CS_RFM12, SPI_CS_HARDWARE) |
| 88 | RFM12_USE_INT(0) |
| 89 | dnl RFM12_USE_PCINT(0, PB0) |
| 90 | dnl RFM12_ASK_SENSE_USE_INT(1) |
| 91 | /* port the LEDS for rfm12 txrx attached to */ |
| 92 | pin(RFM12_TX_PIN, STATUSLED_TX) |
| 93 | pin(RFM12_RX_PIN, STATUSLED_RX) |
| 94 | ')dnl |
| 95 | }}} |