PyMODINIT_FUNC PyInit__pygit2(void) { PyObject* m; m = PyModule_Create(&moduledef); return moduleinit(m); }
PyMODINIT_FUNC init_pygit2(void) { PyObject* m; m = Py_InitModule3("_pygit2", module_methods, "Python bindings for libgit2."); moduleinit(m); }
int main() { int oldl = 1000, oldh = 1000, oldt = 1000;//, oldr = 1000; unsigned char out[4]; unsigned char rec[5]; unsigned char temp[2]; moduleinit(); while (1) { //receive and convert temperature ds1631_temp(temp); float c = temp[0]; if (temp[1]) { c += 0.5; } float f = (9*c)/5; int x = f +32; //unsigned char rmt = rx_char(); if (low != oldl) { moveto(0x45); stringout(" "); //clear previous number moveto(0x45); sprintf(out, "%2d", low); stringout(out); oldl = low; } if (high != oldh) { moveto(0x4d); stringout(" "); //clear previous number moveto(0x4d); sprintf(out, "%2d", high); stringout(out); oldh = high; } if (x != oldt) { moveto(5); stringout(" "); moveto(5); itoa(x, out, 10); stringout(out); oldt = x; //send temperature if (x > 0) { tx_char('+'); } else if (x < 0) { tx_char('-'); } //if 3 digits if (out[2] == 0) { tx_char('0'); _delay_ms(5); tx_char(out[0]); _delay_ms(5); tx_char(out[1]); } //if 2 digits else { tx_char(out[0]); _delay_ms(5); tx_char(out[1]); _delay_ms(5); tx_char(out[2]); } } //receive temperature if (UCSR0A & (1 << RXC0)) { // character has been received if (rx_char() == '+') { rec[0] = rx_char(); //100's digit if (rec[0] == '0') { //if 100's digit is 0 rec[0] = rx_char(); rec[1] = rx_char(); rec[2] = 0; } else { //else reset rec[0] to 10's digit rec[1] = rx_char(); rec[2] = rx_char(); rec[3] = 0; } } else if (rx_char() == '-') { rec[0] = '-'; rec[1] = rx_char(); if (rec[1] == '0') { //if 100's digit is 0 rec[1] = rx_char(); rec[2] = rx_char(); rec[3] = 0; } else { //else reset rec[0] to 10's digit rec[2] = rx_char(); rec[3] = rx_char(); rec[4] = 0; } } moveto(13); stringout(" "); moveto(13); stringout(rec); } if (x < low) { PORTD |= (1 << PD3); } else { PORTD &= ~(1 << PD3); } if (x > high) { PORTD |= (1 << PD2); } else { PORTD &= ~(1 << PD2); } moveto(0x50); //move cursor off of screen } return 0; }
PyMODINIT_FUNC PyInit__uinput(void) { return moduleinit(); }
PyMODINIT_FUNC PyInit_subr(void) { return moduleinit(); }
PyMODINIT_FUNC initcext(void) { moduleinit(); }
PyMODINIT_FUNC PyInit_osk(void) { return moduleinit(); }
PyMODINIT_FUNC init_ecos(void) { import_array(); // for numpy arrays moduleinit(); }
PyMODINIT_FUNC initlru(void) { moduleinit(); }
PyMODINIT_FUNC PyInit__sky_lib(void) { import_array(); return moduleinit(); }
PyMODINIT_FUNC PyInit_virtkey(void) { return moduleinit(); }
PyMODINIT_FUNC initvirtkey(void) { moduleinit(); }
PyObject *PyInit__librsync(void) { return moduleinit(); }
void init_librsync(void) { moduleinit(); }
PyMODINIT_FUNC initrepos(void) { moduleinit(); }
PyMODINIT_FUNC PyInit_repos(void) { return moduleinit(); }
/* The init function name has to match that of the compiled module * with the pattern 'init<module name>'. This module is called '_sky_lib' */ PyMODINIT_FUNC init_sky_lib(void) { import_array(); moduleinit(); return; }
PyMODINIT_FUNC PyInit_libhivexmod (void) { return moduleinit (); }
PyMODINIT_FUNC PyInit__ecos(void) { import_array(); // for numpy arrays return moduleinit(); }
void initlibhivexmod (void) { (void) moduleinit (); }
/* The init function name has to match that of the compiled module * with the pattern 'init<module name>'. This module is called '_measurement_set_lib' */ PyMODINIT_FUNC init_measurement_set_lib(void) { import_array(); moduleinit(); return; }
init_scs_direct(void) #endif { import_array(); /* for numpy arrays */ moduleinit(); }
PyMODINIT_FUNC initosk(void) { moduleinit(); }
PyMODINIT_FUNC PyInit__vis_block_lib(void) { import_array(); return moduleinit(); }
PyMODINIT_FUNC PyInit_cext(void) { return moduleinit(); }
/* The init function name has to match that of the compiled module * with the pattern 'init<module name>'. This module is called '_vis_block_lib' */ PyMODINIT_FUNC init_vis_block_lib(void) { import_array(); moduleinit(); return; }
PyMODINIT_FUNC initsubr(void) { moduleinit(); }
PyMODINIT_FUNC init_pack(void) { moduleinit(); }
PyMODINIT_FUNC init_uinput(void) { moduleinit(); }
PyMODINIT_FUNC initcmfcc(void) { moduleinit(); import_array(); }